firmware icon indicating copy to clipboard operation
firmware copied to clipboard

[Bug]: SimpleJSON is unmaintained

Open fifieldt opened this issue 1 year ago • 8 comments

We use code from the SimpleJSON library: https://github.com/MJPA/SimpleJSON Specifically,

  • src/serialization/JSON{.cpp,h}
  • src/serialization/JSONValue{.cpp,h}

This code has not been updated in 8 years and the project appears unmaintained.

We should consider courses of action such as:

  1. Investigate potential alternate libraries
  2. Determine whether the meshtastic community should take on a maintainer role for this code
  3. Patch some of the identified flaws

fifieldt avatar Sep 09 '24 12:09 fifieldt

This is already the 2nd JSON lib we are using. Obvious choice would be the well maintained ArduinoJSON but is is rather big for the task.

https://github.com/meshtastic/json11

Suggestions welcome.

caveman99 avatar Sep 09 '24 12:09 caveman99

JSON should leave the device and be managed on a PI or something with more resources.

garthvh avatar Sep 09 '24 14:09 garthvh

I vote for adding an MQTT bridge to the Meshtastic portfolio, and removing the JSON feature from the firmware.

jp-bennett avatar Sep 09 '24 14:09 jp-bennett

Probably wouldn't be hard to extend https://github.com/fifieldt/meshtastic-map-backend

to bridge MQTT and JSON in general, rather than just for maps. Could maybe even add some native homeassistant json stuff to make that integration easier...

@pdxlocations also has some nice MQTT bridge code.

fifieldt avatar Sep 15 '24 11:09 fifieldt

We probably need to accelerate this being replaced.

garthvh avatar Sep 19 '24 14:09 garthvh

This is already the 2nd JSON lib we are using. Obvious choice would be the well maintained ArduinoJSON but is is rather big for the task.

https://github.com/meshtastic/json11

Suggestions welcome.

This is also abandoned by dropbox (maybe even older than our current library)

garthvh avatar Sep 19 '24 14:09 garthvh

this is what it looks like with ArduinoJson: https://github.com/meshtastic/firmware/pull/4661

fifieldt avatar Sep 22 '24 02:09 fifieldt

Has anyone looked into the protobuf library for this conversion? https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/util/json_util.h

fifieldt avatar Sep 22 '24 02:09 fifieldt

JSON functionality in the firmware is in the process of being retired https://github.com/meshtastic/firmware/issues/5507

garthvh avatar Dec 17 '24 16:12 garthvh