mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Talk about error cleanup in README
This commit is contained in:
@@ -70,6 +70,14 @@ The types that can be sent to the callback function are
|
|||||||
<code>JSON_ARRAY</code>, <code>JSON_HASH</code>, <code>JSON_COMMA</code>,
|
<code>JSON_ARRAY</code>, <code>JSON_HASH</code>, <code>JSON_COMMA</code>,
|
||||||
and <code>JSON_COLON</code>.
|
and <code>JSON_COLON</code>.
|
||||||
|
|
||||||
|
Cleanup
|
||||||
|
-------
|
||||||
|
|
||||||
|
If there was an error while parsing, the parser will have returned NULL before
|
||||||
|
all the containers were closed. You will probably want to call <code>json_free()</code>
|
||||||
|
on the <code>root</code> elemement of the parser, which should contain the full parse
|
||||||
|
tree so far, to avoid leaking memory.
|
||||||
|
|
||||||
Shutdown
|
Shutdown
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@@ -103,6 +111,8 @@ The parser object has two fields of public interest: <code>error</code> is a str
|
|||||||
describing any errors found in the JSON, and <code>line</code> is the current line number
|
describing any errors found in the JSON, and <code>line</code> is the current line number
|
||||||
being read from the input to make it easier to find the errors.
|
being read from the input to make it easier to find the errors.
|
||||||
|
|
||||||
|
The <code>root</code> field points to the outer object of the current parse tree.
|
||||||
|
|
||||||
Utility function
|
Utility function
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user