Is there a way to serialise functions() using util::JsonOutStream?
That wouldn't be JSON :) JSON is actually formally defined to only support maps, lists, and the three scalar types numbers, string literals, and booleans.
It sounds like what you might want is something to generate JavaScript source code. In compilerJs we have JsWriter, but for the most part its just hand written code using normal OutStream methods.
SlimerDude Tue 8 Jul 2014
Is there a way to serialise
functions()
usingutil::JsonOutStream
?For example, I'd like to create a map which, when written, produces:
It seems only possible to create string values:
?
brian Tue 8 Jul 2014
That wouldn't be JSON :) JSON is actually formally defined to only support maps, lists, and the three scalar types numbers, string literals, and booleans.
It sounds like what you might want is something to generate JavaScript source code. In compilerJs we have JsWriter, but for the most part its just hand written code using normal OutStream methods.