JSON on LPC1347

A 40 Pin Dip packaged development board enabling you to create internet connected products

JSON on LPC1347

Postby andrewdlindsay » Sat Feb 22, 2014 9:20 pm

Hi Guys,

I'm trying to do some JSON parsing of some results received by my WiFiDIPCortex but there seems to be a distinct lack of usable JSON libraries available for mbed.

I was trying picojson but that gives lots of errors:

Code: Select all
Error: No space in execution regions with .ANY selector matching vendor.o(.bss__ZNSs9__nullrefE).
Error: No space in execution regions with .ANY selector matching main.cpp.LPC1347.o(.data).
Error: Sections of aggregate size 0x7c bytes could not fit into .ANY selector(s).


However this does compile on LPC1768 mbed boards.

I tried MbedJSONValue which did compile but seems to hang within the library when trying to parse the json string.

In the meantime I'm trying some simple examples to see if I can narrow down where the problem lies.

Cheers

Andrew
andrewdlindsay
 
Posts: 17
Joined: Tue Jan 28, 2014 9:29 pm

Re: JSON on LPC1347

Postby Carl-SolderSplash » Sat Feb 22, 2014 10:52 pm

Hi have you tried picojson ...

http://mbed.org/users/mimil/code/picojson/

Example of it in use here : http://mbed.org/users/ansond/code/df-20 ... mostat.cpp

I'm playing with socket.io stuff at the momment so may need to look at JSON parsing soon too

EDIT : Looking at twitter I see I am a few hours late and you have tried picojson
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: JSON on LPC1347

Postby andrewdlindsay » Sun Feb 23, 2014 3:16 pm

picojson is the one that is giving the errors. It seems to be processor specific as the errors arent thee when I try to compile for a 1768 mbed. I've not tried my freescale board yet.

I'm guessing that since the WiFiDIPCortex are fairly new there may not have been anyone trying JSON with them so this issue wouldnt have been seen. I'm basically trying to use skynet.im, or more specifically a local version of this. The responses are all JSON and are being received, its just the parsing now to get the required data.

Dog walk first then look at it again.

Cheers

Andrew
andrewdlindsay
 
Posts: 17
Joined: Tue Jan 28, 2014 9:29 pm

Re: JSON on LPC1347

Postby andrewdlindsay » Sun Feb 23, 2014 4:52 pm

Having some success now, but with code borrowed from http://mbed.org/users/vladounet/code/EvrythngApi/. I just created a new library with just the JsonParser.h and .cpp files, removed the debug code for now and I'm able to extract values. When I get it into a stable state and I'm sure its working I'll publish it as a separate library, after checking licenses etc on the code.

Cheers

Andrew
andrewdlindsay
 
Posts: 17
Joined: Tue Jan 28, 2014 9:29 pm


Return to WiFi DipCortex

Who is online

Users browsing this forum: No registered users and 6 guests

cron