JSON Decoder on megaAVR 0-series

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TB3239 - JSON Decoder for PIC and AVR

mega4808, USB CDC ACM via nEDBG, MPLAB X with MCC plug-in

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Jan 17, 2020 - 05:19 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interesting but I wonder what kind of resource usage this has? In particular how big a JSON can it actually cope with. All the leafs of the tree are going to need pointers to the keys and the values as a minimum.

 

Personally I've had a lot of experience with:

 

https://github.com/zserge/jsmn

 

which (so far!) has worked faultlessly but this has been use in an embedded environment where resources sizes are never a particularly great worry (RAM/flash measured in MBs not KBs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Interesting but I wonder what kind of resource usage this has? 
Couldn't quickly locate sizing data in TB3239 though format specifiers are mentioned in Encoding | JSON Decoder for PIC® and AVR® Devices (a concern wrt sizing)

clawson wrote:
[jsmn]
Another in the context of embedded OS is Serial Port JSON Server

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

ArduinoJson is arguably the most popular Arduino library, and rightly so. Written and documented to academic standards. It's zero-copy and can use static or dynamically allocated memory. It claims compatibility with Atmel Studio as well.

 

It is C++ though and uses some fairly advanced concepts (that I don't fully understand).

 

https://arduinojson.org