Closed yamalight closed 10 years ago
The 'very strange object' is a valid JSON object/string described in the demo documentation. So it is a 'normal JSON as output', always the same one.
But you are right with the encoded/decoding. This could be replaced with a more conventional method, maybe in version 3.0.0 or feel free to send a pull request.
I wasn't saying the object was invalid, it's just the approach "yo dawg I heard you like json so I encoded json into serialized string and put it into json field in your json" is a bit, well, strange :D
So, at the moment if you ask for JSON-LD, you'll get a very strange object back that has output serialized as an URL encoded string. This adds two additional steps to make processing of such response possible (1 - decode url components, 2 - parse json). And probably adds two steps to serializations as well.
Is there any reason for this? Wouldn't it be better to just have like normal JSON as output? With nested objects and all the good stuff? If it would - please do so :)