Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-05-2012, 03:27 PM   PM User | #1
theboyholty
New to the CF scene

 
Join Date: Apr 2012
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
theboyholty is an unknown quantity at this point
complete JSON newb, download and read file

I am working with APIs and sending information via a URL. For this one new client, the response they send us uses JSON, which I've never used before.

I can send the data ok, but the response comes in the form of a file. It doesn't even seem to have an extension but I can open it manually in notepad. I need to know how to read this file programatically so I can use the data. If I can read this data back into SQL Server, I'll be ok from there.

Any assistance much appreciated.

Thanks.
theboyholty is offline   Reply With Quote
Old 04-06-2012, 01:03 AM   PM User | #2
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,452
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
im guessing you run php, so just use json_decode to turn json into a php array...

in js, you usually use a jsonp technique, or JSON.parse() in conjunction with ajax to grab the file.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%
rnd me is offline   Reply With Quote
Users who have thanked rnd me for this post:
theboyholty (04-13-2012)
Reply

Bookmarks

Tags
json

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:36 PM.


Advertisement
Log in to turn off these ads.