JSON data seems to be king these days, and it’s stored and managed in NoSQL databases like Mongo.
Given this trend, Grid/TreeGrid really needs proper JSON support.
What I mean by that is, proper, generic, nested JSON read/write/parse, NOT a DHTMLX specific flavor of JSON that requires hints such as “DATA” or “ROW” cues.
Ideally, DHTMLX should be able to communicate directly with NoSQL/Mongo directly via the data connector.
Alternately, it should at least be able to write out and read in generic, nested JSON.
For example, see the below JSON from Mongo.
It’s a nightmare getting this into TreeGrid, then back out and to Mongo. I think I’m going to need to write a complex recursive function just to do it.
Given the popularity of JSON and NoSQL, DHTMLX should just do this with a single method.
Anyone have any ideas how to output the following (highly standard) JSON from TreeGrid?
{
"_id": "XYZ_123_ghghgh",
"NpcResponses": [{
"Challenge": "Hello there traveler!",
"PlayerResponses": [{
"Keywords": ["hello","hi"],
"NpcResponses": [{
"Challenge": "Would you [mind] doing something for me?",
"PlayerResponses": [{
"Keywords": ["mind","sure","ok"],
"NpcResponses": [{
"Challenge": "Please [take] this bag of sugar to the stable master.",
"PlayerResponses": [{
"Keywords": ["ok","take","yes"],
"NpcResponses": [{
"Challenge": "Thank you, you are most kind.",
"Event": "AVP_QST_BagOfSugar01"
}]
},
{
"Keywords": ["no"],
"NpcResponses": [{
"SetMood": "Disappointed",
"Challenge": "Oh well, have a nice day."
}]
}]
}]
},
{
"Keywords": ["no"],
"NpcResponses": [{
"Event": "Set Mood Disappointed",
"Challenge": "Never mind, I'll find someone else to help me."
}]
}]
}]
}]
}]
}