Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Lightweight JSON parser


  • Please log in to reply
22 replies to this topic

#21 roguemat

roguemat

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts
  • LocationSouth Africa

Posted 16 January 2013 - 04:06 PM

Good work, looks good!


I make Windows Phone stuff for beer money and rent (in order of priority). I've got a blog and am on the Twitter machine.

#22 H07R0D

H07R0D

    Advanced Member

  • Members
  • PipPipPip
  • 95 posts

Posted 17 January 2013 - 07:54 PM

Hi everyone, just wondering if there is a status update on this project. I was looking around for a JSON parser for the N+2 and this is only one of two projects that I have found so far. I have confirmed that the latest code available fails all of the tests. Because it still looks like Fabien doesn't have time to fix the parser, I started to work on it yesterday.

I am making some progress, but while I understand exactly what Fabien's design intends to do, there are little gotchas here and there that trip me up. Besides saying "thank you" for providing us with the code, I have to say "THANK YOU" for providing unit tests with this project, Fabien. :) That's the only way I'll be able to verify that things are working.

So far, I have the first two unit tests working. I'm now ironing out problems with the serializing of arrays of strings in the third test case. And one of the outstanding issues is that my modifications to the Find() method that has the ArrayList outparam unintentionally made it output an ArrayList of JSONObjects and not Hashtable, so I temporarily changed the unit tests to take this into account by casting in the loop.

Hi Dave, 

I've got one in my Aquarium Controller project you can try.

https://github.com/h...troller/JSON.cs

It has been working fine for me on my N2+



#23 Dave M.

Dave M.

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 17 January 2013 - 11:26 PM

@H07R0D cool, thanks, I'll take a look at it.  That's the other one I had found but never looked at it.  I'm glad to hear that it works.

 

The main problem I've come across with the JSON parser in this thread is that it doesn't deal with nested values too well.  I was going to hack in a fix, but haven't gotten around to it yet because I keep thinking that it might be better to just rewrite parts of it.

 

Oooh..  I just looked at the code for the one you posted and it does serialization as well.  Awesome!  Thanks again.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.