On 8/14/16 8:52 AM, Sönke Ludwig wrote:
The
Json
struct is stored similar to anAlgebraic!(bool, int, string, Json[], Json[string])
(in contrast toBson
, which parses the original source data on demand). So any string constants will be destroyed (object keys or string values), but the structure of arrays and objects will remain allocated.
OK. I'm dealing with mysql-native, which instead of allocating strings
on the heap just casts from the input stream. So there are lifetime
issues there. I'll just idup before I give it to the json parser.
Thanks
-Steve