jamoma / JamomaCore

Jamoma Frameworks for Audio and Control Structure
Other
36 stars 14 forks source link

Add JSON desc method for TTData, TTContainer, TTState, TTApplication #6

Open tap opened 11 years ago

tap commented 11 years ago

This is now a sub-task of #123. TTData, TTContainer, TTState, and TTApplication may all be represented using the redesigned TTDictionary. As such, serialization to/from JSON may be implemented as methods to TTDictionary.

At the workshop in Albi we discussed using yaml-cpp as the library for JSON parsing. I have only used that library for YAML, but @hems mentioned that it should also work for JSON because JSON is a strict superset of YAML.

Another option, which I also think we could explore is JSMN ( http://zserge.bitbucket.org/jsmn.html ).

tap commented 9 years ago

It also appears that there is currently the use of (at least) one other JSON library in Jamoma, though I don't recall ever discussing that...

theod commented 9 years ago

I would like to add @jcelerier to this thread because I saw he use jeayeson library for one of its project so maybe he have good reason for that ? and @laugre used libjson for the websocket plugin here

theod commented 9 years ago

and I would like to add one of the json library proposed above to the Foundation module to make a fromJSON() and toJSON() functions for TTDictionary class. I'll do it on feature/state branch.

@tap : do you have any recommendations about where to put the files in the repo ?

jcelerier commented 9 years ago

@theod : "so maybe he have good reason for that ?" -> no good reason other than learning :) and I don't think I would recommend it, I found the api to be a bit verbose in comparison to Qt's JSON API. However the plus side is that it's header only, which means that inclusion is quite easy.

tap commented 9 years ago

Ideally we would quarantine all of our 3rd-party dependencies into a folder of their own like "third-party". That would include libxml, json, mersenne-twister, etc.