How to obtain/implement the position (line and column) from Json-source-file #4596
Replies: 2 comments 2 replies
-
This is currently not possible in the SAX interface. We are currently working on #4585 which will use the information collected with I think there is no way to get these information in the SAX parser without making several changes to the SAX interface. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
Thanks in advance for your reply. |
Beta Was this translation helpful? Give feedback.
-
Hello dear Team Json ,
First. Thanks very much for the library.
Second. according to the already existing "Q&A" looks like, that it is not possible to obtain/read/get the current position (line and column) from Json-source-file while the SAX-parse is being used.
But it looks, that the information is available.
Question:
Can you please indicate , where is the best place in the json--nlohmann-library to add the implementation of the providing the current position (line and column) from Json-source-file while the SAX-parse is being used.
I am thinking about to extend the SAX interface json_sax_t with one API to set the current position (line and column) from Json-source-file while the SAX-parse is being used and before the call-backs are called, so that , when one of the callbacks is called, then the information is available
json-lib parses sorce file -> json-lib sets the position from sorce file -> json-lib calls one SAX-callbacks
Beta Was this translation helpful? Give feedback.
All reactions