[BZ#707100] Expose current node on JsonReader
Submitted by Philip Withnall <<bug..@...uk>>
It would be nice if JsonReader exposed its current_node as a property with a getter, so that clients can always get a JsonNode out of the reader easily. At the moment, I believe this is only possible by calling json_reader_get_value() for value nodes, and by manually extracting and re-building the JsonNode for objects or arrays.
Use case: my JSON parser needs to save JSON which it doesn’t recognise (e.g. as introduced in later versions of the specification it conforms to) so that it can re-inject them into JSON objects which are being re-uploaded to a server. This prevents data loss. I want to grab a JsonNode for each unrecognised member of a JSON object.