2017-12-07 18:06:19 -05:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
2018-03-05 23:18:59 -05:00
< meta name = "generator" content = "Doxygen 1.8.8" / >
2017-12-07 18:06:19 -05:00
< title > json-c: json_tokener.h File Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
2018-03-05 23:18:59 -05:00
< td style = "padding-left: 0.5em;" >
2017-12-07 18:06:19 -05:00
< div id = "projectname" > json-c
2018-03-05 23:18:59 -05:00
  < span id = "projectnumber" > 0.13.1< / span >
2017-12-07 18:06:19 -05:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2018-03-05 23:18:59 -05:00
<!-- Generated by Doxygen 1.8.8 -->
< div id = "navrow1" class = "tabs" >
< ul class = "tablist" >
< li > < a href = "index.html" > < span > Main  Page< / span > < / a > < / li >
< li > < a href = "pages.html" > < span > Related  Pages< / span > < / a > < / li >
< li > < a href = "annotated.html" > < span > Data  Structures< / span > < / a > < / li >
< li class = "current" > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< / ul >
< / div >
< div id = "navrow2" class = "tabs2" >
< ul class = "tablist" >
< li > < a href = "files.html" > < span > File  List< / span > < / a > < / li >
< li > < a href = "globals.html" > < span > Globals< / span > < / a > < / li >
< / ul >
< / div >
2017-12-07 18:06:19 -05:00
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#nested-classes" > Data Structures< / a > |
< a href = "#define-members" > Macros< / a > |
< a href = "#typedef-members" > Typedefs< / a > |
< a href = "#enum-members" > Enumerations< / a > |
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" >
< div class = "title" > json_tokener.h File Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > Methods to parse an input string into a tree of < a class = "el" href = "structjson__object.html" > json_object< / a > objects.
< a href = "#details" > More...< / a > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "nested-classes" > < / a >
Data Structures< / h2 > < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structjson__tokener__srec.html" > json_tokener_srec< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "define-members" > < / a >
Macros< / h2 > < / td > < / tr >
< tr class = "memitem:a5ccd346459feb66e4e0af32005360279" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a5ccd346459feb66e4e0af32005360279" > JSON_TOKENER_DEFAULT_DEPTH< / a >       32< / td > < / tr >
< tr class = "separator:a5ccd346459feb66e4e0af32005360279" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a72be595cb7e090c70b1d29feb1cbfb16" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a72be595cb7e090c70b1d29feb1cbfb16" > JSON_TOKENER_STRICT< / a >       0x01< / td > < / tr >
< tr class = "separator:a72be595cb7e090c70b1d29feb1cbfb16" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "typedef-members" > < / a >
Typedefs< / h2 > < / td > < / tr >
< tr class = "memitem:a4dd5e5b65aee7f376f529f86b210ff49" > < td class = "memItemLeft" align = "right" valign = "top" > typedef struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a4dd5e5b65aee7f376f529f86b210ff49" > json_tokener< / a > < / td > < / tr >
< tr class = "separator:a4dd5e5b65aee7f376f529f86b210ff49" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "enum-members" > < / a >
Enumerations< / h2 > < / td > < / tr >
< tr class = "memitem:a0a31f0df8a532ef8be5c09ba40eacb59" > < td class = "memItemLeft" align = "right" valign = "top" > enum   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a > { < br / >
    < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59afe2fa9bde03155019b2df30f66a5fcd0" > json_tokener_success< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a9b26e920ca765df91c84e999561d8fb0" > json_tokener_continue< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a59b2c36d9cc30c3038e09b9ddee6c86c" > json_tokener_error_depth< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a8f774f4c7869afdd9b92295fca3a9ded" > json_tokener_error_parse_eof< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a3309fa8ea4ab3ee0a81c55b69d223710" > json_tokener_error_parse_unexpected< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a641bbb8d881fdd1e463f20a1a203b77c" > json_tokener_error_parse_null< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59addbdfe084e20709da3d20c8ae8ca278c" > json_tokener_error_parse_boolean< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59ab1b3ad685eb97235d269cc5b9eb7ab81" > json_tokener_error_parse_number< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a574846740b785146f164a209dc89574e" > json_tokener_error_parse_array< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a2003bd8e96c6680cd22419c5ceafd4c0" > json_tokener_error_parse_object_key_name< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59af91a2a819b0d6344d6d4e1d2579f28fd" > json_tokener_error_parse_object_key_sep< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a9ddb98741aebf7ac44735b4a43717013" > json_tokener_error_parse_object_value_sep< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a033ce89ce7b8f9e591e4bea92121c4c7" > json_tokener_error_parse_string< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a3588c05b1da8b909a8cbdef66b0a1a28" > json_tokener_error_parse_comment< / a > ,
< a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59a1eeed74de65c0c12c9f9c28cf4f3ff1d" > json_tokener_error_size< / a >
< br / >
}< / td > < / tr >
< tr class = "separator:a0a31f0df8a532ef8be5c09ba40eacb59" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af026dec71e4548e6200eb2f902f1c4e2" > < td class = "memItemLeft" align = "right" valign = "top" > enum   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2" > json_tokener_state< / a > { < br / >
    < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a9db152607ec1872a000f1fcd8757297d" > json_tokener_state_eatws< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a7c4c0bed1ebde45f5a99de4278792d72" > json_tokener_state_start< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2ad80b689cb709967b67a348de3d8601d2" > json_tokener_state_finish< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a668fb2654c59608945370003403a5792" > json_tokener_state_null< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a0ff1d1935d49188aa1e6b998d43e655c" > json_tokener_state_comment_start< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a8c2680b8873a8dce85f0b1ac25882dc9" > json_tokener_state_comment< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2ad8151350b1ef50298bafbab244ac1162" > json_tokener_state_comment_eol< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a62cef297a37a98b1239ea4bbd39723e1" > json_tokener_state_comment_end< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2aa90ea4c327a285bfbbce49d42d491d65" > json_tokener_state_string< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a1cf793d73587f68c4f2b3b4f65ff728e" > json_tokener_state_string_escape< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a6c852da2e694be56799c58c201d6dca0" > json_tokener_state_escape_unicode< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a3525b15ecd0a698281b3914115b6bd3e" > json_tokener_state_boolean< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a7ce18d281d322af690b45f3b8b599e81" > json_tokener_state_number< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2ab3d763300f1914865be09d603ddc11f4" > json_tokener_state_array< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2aa2a01798ebe318ea91c38a886418f771" > json_tokener_state_array_add< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a4ec7762aeab3424cbb14354c94025865" > json_tokener_state_array_sep< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a8c7dbda177a5d83a36a64f7cb99b9a29" > json_tokener_state_object_field_start< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a77375940a10806e81d99876d13be67fc" > json_tokener_state_object_field< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a0220aea1d9204aadfffde92c7f73f5f7" > json_tokener_state_object_field_end< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a4c7b7deac37355491572f6da84f208aa" > json_tokener_state_object_value< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2ade6bee72f2147e634b19eb84e58eb162" > json_tokener_state_object_value_add< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2adaf3e06c5fc04fd4f04040cd67698215" > json_tokener_state_object_sep< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2ab1a0ad626ec662c1ba4fb5bfee1cd0a9" > json_tokener_state_array_after_sep< / a > ,
< a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2a3a2c9cf26d076936a10a6ae3ca4eb523" > json_tokener_state_object_field_start_after_sep< / a > ,
< br / >
    < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2ab9f6244bfca4924db61ed3050c780b53" > json_tokener_state_inf< / a >
< br / >
}< / td > < / tr >
< tr class = "separator:af026dec71e4548e6200eb2f902f1c4e2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a04c5625212aed3216cc303429e47f642" > < td class = "memItemLeft" align = "right" valign = "top" > const char *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a04c5625212aed3216cc303429e47f642" > json_tokener_error_desc< / a > (enum < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a > jerr)< / td > < / tr >
< tr class = "separator:a04c5625212aed3216cc303429e47f642" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af5d7ffd95a0f6e5d5bb5994d233b4197" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > enum < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#af5d7ffd95a0f6e5d5bb5994d233b4197" > json_tokener_get_error< / a > (struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *tok)< / td > < / tr >
< tr class = "separator:af5d7ffd95a0f6e5d5bb5994d233b4197" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a5ac7e2c350bc592cf2fa7b9935b00ef5" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a5ac7e2c350bc592cf2fa7b9935b00ef5" > json_tokener_new< / a > (void)< / td > < / tr >
< tr class = "separator:a5ac7e2c350bc592cf2fa7b9935b00ef5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6a1583ddd434e13515d6232de813462e" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a6a1583ddd434e13515d6232de813462e" > json_tokener_new_ex< / a > (int depth)< / td > < / tr >
< tr class = "separator:a6a1583ddd434e13515d6232de813462e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a887c4661906fc6b36cc366304e522534" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a887c4661906fc6b36cc366304e522534" > json_tokener_free< / a > (struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *tok)< / td > < / tr >
< tr class = "separator:a887c4661906fc6b36cc366304e522534" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a238649a59737be5152d525aeaf4153ab" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a238649a59737be5152d525aeaf4153ab" > json_tokener_reset< / a > (struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *tok)< / td > < / tr >
< tr class = "separator:a238649a59737be5152d525aeaf4153ab" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a236ef64d079822a4411d13eae7190c4d" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__object.html" > json_object< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a236ef64d079822a4411d13eae7190c4d" > json_tokener_parse< / a > (const char *str)< / td > < / tr >
< tr class = "separator:a236ef64d079822a4411d13eae7190c4d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a735f2dc755d57ed5c5b807aaaaef3b14" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__object.html" > json_object< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a735f2dc755d57ed5c5b807aaaaef3b14" > json_tokener_parse_verbose< / a > (const char *str, enum < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a > *error)< / td > < / tr >
< tr class = "separator:a735f2dc755d57ed5c5b807aaaaef3b14" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a7e7a0c0c9dc79e5e47b2608bb8aad7b7" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a7e7a0c0c9dc79e5e47b2608bb8aad7b7" > json_tokener_set_flags< / a > (struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *tok, int flags)< / td > < / tr >
< tr class = "separator:a7e7a0c0c9dc79e5e47b2608bb8aad7b7" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a61679f178111963a9ffa3c8179553f7a" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__object.html" > json_object< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a" > json_tokener_parse_ex< / a > (struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *tok, const char *str, int len)< / td > < / tr >
< tr class = "separator:a61679f178111963a9ffa3c8179553f7a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Methods to parse an input string into a tree of < a class = "el" href = "structjson__object.html" > json_object< / a > objects. < / p >
< / div > < h2 class = "groupheader" > Macro Definition Documentation< / h2 >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a5ccd346459feb66e4e0af32005360279" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define JSON_TOKENER_DEFAULT_DEPTH      32< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a72be595cb7e090c70b1d29feb1cbfb16" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define JSON_TOKENER_STRICT      0x01< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Be strict when parsing JSON input. Use caution with this flag as what is considered valid may become more restrictive from one release to the next, causing your code to fail on previously working input.< / p >
< p > This flag is not set by default.< / p >
< dl class = "section see" > < dt > See also< / dt > < dd > < a class = "el" href = "json__tokener_8h.html#a7e7a0c0c9dc79e5e47b2608bb8aad7b7" > json_tokener_set_flags()< / a > < / dd > < / dl >
< / div >
< / div >
< h2 class = "groupheader" > Typedef Documentation< / h2 >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a4dd5e5b65aee7f376f529f86b210ff49" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > typedef struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< dl class = "deprecated" > < dt > < b > < a class = "el" href = "deprecated.html#_deprecated000006" > Deprecated:< / a > < / b > < / dt > < dd > Unused in json-c code < / dd > < / dl >
< / div >
< / div >
< h2 class = "groupheader" > Enumeration Type Documentation< / h2 >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > enum < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< table class = "fieldtable" >
2018-03-05 23:18:59 -05:00
< tr > < th colspan = "2" > Enumerator< / th > < / tr > < tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59afe2fa9bde03155019b2df30f66a5fcd0" > < / a > json_tokener_success  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a9b26e920ca765df91c84e999561d8fb0" > < / a > json_tokener_continue  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a59b2c36d9cc30c3038e09b9ddee6c86c" > < / a > json_tokener_error_depth  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a8f774f4c7869afdd9b92295fca3a9ded" > < / a > json_tokener_error_parse_eof  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a3309fa8ea4ab3ee0a81c55b69d223710" > < / a > json_tokener_error_parse_unexpected  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a641bbb8d881fdd1e463f20a1a203b77c" > < / a > json_tokener_error_parse_null  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59addbdfe084e20709da3d20c8ae8ca278c" > < / a > json_tokener_error_parse_boolean  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59ab1b3ad685eb97235d269cc5b9eb7ab81" > < / a > json_tokener_error_parse_number  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a574846740b785146f164a209dc89574e" > < / a > json_tokener_error_parse_array  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a2003bd8e96c6680cd22419c5ceafd4c0" > < / a > json_tokener_error_parse_object_key_name  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59af91a2a819b0d6344d6d4e1d2579f28fd" > < / a > json_tokener_error_parse_object_key_sep  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a9ddb98741aebf7ac44735b4a43717013" > < / a > json_tokener_error_parse_object_value_sep  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a033ce89ce7b8f9e591e4bea92121c4c7" > < / a > json_tokener_error_parse_string  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a3588c05b1da8b909a8cbdef66b0a1a28" > < / a > json_tokener_error_parse_comment  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "a0a31f0df8a532ef8be5c09ba40eacb59a1eeed74de65c0c12c9f9c28cf4f3ff1d" > < / a > json_tokener_error_size  < / td > < td class = "fielddoc" >
< / td > < / tr >
2017-12-07 18:06:19 -05:00
< / table >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > enum < a class = "el" href = "json__tokener_8h.html#af026dec71e4548e6200eb2f902f1c4e2" > json_tokener_state< / a > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< table class = "fieldtable" >
2018-03-05 23:18:59 -05:00
< tr > < th colspan = "2" > Enumerator< / th > < / tr > < tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a9db152607ec1872a000f1fcd8757297d" > < / a > json_tokener_state_eatws  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a7c4c0bed1ebde45f5a99de4278792d72" > < / a > json_tokener_state_start  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2ad80b689cb709967b67a348de3d8601d2" > < / a > json_tokener_state_finish  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a668fb2654c59608945370003403a5792" > < / a > json_tokener_state_null  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a0ff1d1935d49188aa1e6b998d43e655c" > < / a > json_tokener_state_comment_start  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a8c2680b8873a8dce85f0b1ac25882dc9" > < / a > json_tokener_state_comment  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2ad8151350b1ef50298bafbab244ac1162" > < / a > json_tokener_state_comment_eol  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a62cef297a37a98b1239ea4bbd39723e1" > < / a > json_tokener_state_comment_end  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2aa90ea4c327a285bfbbce49d42d491d65" > < / a > json_tokener_state_string  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a1cf793d73587f68c4f2b3b4f65ff728e" > < / a > json_tokener_state_string_escape  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a6c852da2e694be56799c58c201d6dca0" > < / a > json_tokener_state_escape_unicode  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a3525b15ecd0a698281b3914115b6bd3e" > < / a > json_tokener_state_boolean  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a7ce18d281d322af690b45f3b8b599e81" > < / a > json_tokener_state_number  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2ab3d763300f1914865be09d603ddc11f4" > < / a > json_tokener_state_array  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2aa2a01798ebe318ea91c38a886418f771" > < / a > json_tokener_state_array_add  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a4ec7762aeab3424cbb14354c94025865" > < / a > json_tokener_state_array_sep  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a8c7dbda177a5d83a36a64f7cb99b9a29" > < / a > json_tokener_state_object_field_start  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a77375940a10806e81d99876d13be67fc" > < / a > json_tokener_state_object_field  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a0220aea1d9204aadfffde92c7f73f5f7" > < / a > json_tokener_state_object_field_end  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a4c7b7deac37355491572f6da84f208aa" > < / a > json_tokener_state_object_value  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2ade6bee72f2147e634b19eb84e58eb162" > < / a > json_tokener_state_object_value_add  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2adaf3e06c5fc04fd4f04040cd67698215" > < / a > json_tokener_state_object_sep  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2ab1a0ad626ec662c1ba4fb5bfee1cd0a9" > < / a > json_tokener_state_array_after_sep  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2a3a2c9cf26d076936a10a6ae3ca4eb523" > < / a > json_tokener_state_object_field_start_after_sep  < / td > < td class = "fielddoc" >
< / td > < / tr >
< tr > < td class = "fieldname" > < a class = "anchor" id = "af026dec71e4548e6200eb2f902f1c4e2ab9f6244bfca4924db61ed3050c780b53" > < / a > json_tokener_state_inf  < / td > < td class = "fielddoc" >
< / td > < / tr >
2017-12-07 18:06:19 -05:00
< / table >
< / div >
< / div >
< h2 class = "groupheader" > Function Documentation< / h2 >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a04c5625212aed3216cc303429e47f642" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > const char* json_tokener_error_desc < / td >
< td > (< / td >
< td class = "paramtype" > enum < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a >   < / td >
< td class = "paramname" > < em > jerr< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Given an error previously returned by < a class = "el" href = "json__tokener_8h.html#af5d7ffd95a0f6e5d5bb5994d233b4197" > json_tokener_get_error()< / a > , return a human readable description of the error.< / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > a generic error message is returned if an invalid error value is provided. < / dd > < / dl >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a887c4661906fc6b36cc366304e522534" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > void json_tokener_free < / td >
< td > (< / td >
< td class = "paramtype" > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *  < / td >
< td class = "paramname" > < em > tok< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "af5d7ffd95a0f6e5d5bb5994d233b4197" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > enum < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a > json_tokener_get_error < / td >
< td > (< / td >
< td class = "paramtype" > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *  < / td >
< td class = "paramname" > < em > tok< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Retrieve the error caused by the last call to < a class = "el" href = "json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a" > json_tokener_parse_ex()< / a > , or json_tokener_success if there is no error.< / p >
< p > When parsing a JSON string in pieces, if the tokener is in the middle of parsing this will return json_tokener_continue.< / p >
< p > See also < a class = "el" href = "json__tokener_8h.html#a04c5625212aed3216cc303429e47f642" > json_tokener_error_desc()< / a > . < / p >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a5ac7e2c350bc592cf2fa7b9935b00ef5" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > * json_tokener_new < / td >
< td > (< / td >
< td class = "paramtype" > void  < / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a6a1583ddd434e13515d6232de813462e" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > * json_tokener_new_ex < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > depth< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a236ef64d079822a4411d13eae7190c4d" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__object.html" > json_object< / a > * json_tokener_parse < / td >
< td > (< / td >
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > str< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a61679f178111963a9ffa3c8179553f7a" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__object.html" > json_object< / a > * json_tokener_parse_ex < / td >
< td > (< / td >
< td class = "paramtype" > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *  < / td >
< td class = "paramname" > < em > tok< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > str< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > len< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Parse a string and return a non-NULL < a class = "el" href = "structjson__object.html" > json_object< / a > if a valid JSON value is found. The string does not need to be a JSON object or array; it can also be a string, number or boolean value.< / p >
< p > A partial JSON string can be parsed. If the parsing is incomplete, NULL will be returned and < a class = "el" href = "json__tokener_8h.html#af5d7ffd95a0f6e5d5bb5994d233b4197" > json_tokener_get_error()< / a > will return json_tokener_continue. < a class = "el" href = "json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a" > json_tokener_parse_ex()< / a > can then be called with additional bytes in str to continue the parsing.< / p >
< p > If < a class = "el" href = "json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a" > json_tokener_parse_ex()< / a > returns NULL and the error is anything other than json_tokener_continue, a fatal error has occurred and parsing must be halted. Then, the tok object must not be reused until < a class = "el" href = "json__tokener_8h.html#a238649a59737be5152d525aeaf4153ab" > json_tokener_reset()< / a > is called.< / p >
< p > When a valid JSON value is parsed, a non-NULL < a class = "el" href = "structjson__object.html" > json_object< / a > will be returned. Also, < a class = "el" href = "json__tokener_8h.html#af5d7ffd95a0f6e5d5bb5994d233b4197" > json_tokener_get_error()< / a > will return json_tokener_success. Be sure to check the type with < a class = "el" href = "json__object_8h.html#a8ab506a3d8f4ba5eb6a12ce0a6bbd37b" > json_object_is_type()< / a > or < a class = "el" href = "json__object_8h.html#af256a3a7910e271a2b9735e5044c3827" > json_object_get_type()< / a > before using the object.< / p >
< p > < b > XXX< / b > this shouldn't use internal fields: Trailing characters after the parsed value do not automatically cause an error. It is up to the caller to decide whether to treat this as an error or to handle the additional characters, perhaps by parsing another json value starting from that point.< / p >
< p > Extra characters can be detected by comparing the tok-> char_offset against the length of the last len parameter passed in.< / p >
< p > The tokener does < b > not< / b > maintain an internal buffer so the caller is responsible for calling json_tokener_parse_ex with an appropriate str parameter starting with the extra characters.< / p >
< p > This interface is presently not 64-bit clean due to the int len argument so the function limits the maximum string size to INT32_MAX (2GB). If the function is called with len == -1 then strlen is called to check the string length is less than INT32_MAX (2GB)< / p >
2018-03-05 23:18:59 -05:00
< p > Example: < / p > < div class = "fragment" > < div class = "line" > < a name = "l00001" > < / a > < span class = "lineno" > 1< / span >   json_object *jobj = NULL;< / div >
< div class = "line" > < a name = "l00002" > < / a > < span class = "lineno" > 2< / span >   const char *mystring = NULL;< / div >
< div class = "line" > < a name = "l00003" > < / a > < span class = "lineno" > 3< / span >   int stringlen = 0;< / div >
< div class = "line" > < a name = "l00004" > < / a > < span class = "lineno" > 4< / span >   enum json_tokener_error jerr;< / div >
< div class = "line" > < a name = "l00005" > < / a > < span class = "lineno" > 5< / span >   do {< / div >
< div class = "line" > < a name = "l00006" > < / a > < span class = "lineno" > 6< / span >   mystring = ... // get JSON string, e.g. read from file, etc...< / div >
< div class = "line" > < a name = "l00007" > < / a > < span class = "lineno" > 7< / span >   stringlen = strlen(mystring);< / div >
< div class = "line" > < a name = "l00008" > < / a > < span class = "lineno" > 8< / span >   jobj = json_tokener_parse_ex(tok, mystring, stringlen);< / div >
< div class = "line" > < a name = "l00009" > < / a > < span class = "lineno" > 9< / span >   } while ((jerr = json_tokener_get_error(tok)) == json_tokener_continue);< / div >
< div class = "line" > < a name = "l00010" > < / a > < span class = "lineno" > 10< / span >   if (jerr != json_tokener_success)< / div >
< div class = "line" > < a name = "l00011" > < / a > < span class = "lineno" > 11< / span >   {< / div >
< div class = "line" > < a name = "l00012" > < / a > < span class = "lineno" > 12< / span >   fprintf(stderr, " Error: %s\n" , json_tokener_error_desc(jerr));< / div >
< div class = "line" > < a name = "l00013" > < / a > < span class = "lineno" > 13< / span >   // Handle errors, as appropriate for your application.< / div >
< div class = "line" > < a name = "l00014" > < / a > < span class = "lineno" > 14< / span >   }< / div >
< div class = "line" > < a name = "l00015" > < / a > < span class = "lineno" > 15< / span >   if (tok-> char_offset < stringlen) // XXX shouldn' t access internal fields< / div >
< div class = "line" > < a name = "l00016" > < / a > < span class = "lineno" > 16< / span >   {< / div >
< div class = "line" > < a name = "l00017" > < / a > < span class = "lineno" > 17< / span >   // Handle extra characters after parsed object as desired.< / div >
< div class = "line" > < a name = "l00018" > < / a > < span class = "lineno" > 18< / span >   // e.g. issue an error, parse another object from that point, etc...< / div >
< div class = "line" > < a name = "l00019" > < / a > < span class = "lineno" > 19< / span >   }< / div >
< div class = "line" > < a name = "l00020" > < / a > < span class = "lineno" > 20< / span >   // Success, use jobj here.< / div >
< / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
2017-12-07 18:06:19 -05:00
< table class = "params" >
< tr > < td class = "paramname" > tok< / td > < td > a < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > previously allocated with < a class = "el" href = "json__tokener_8h.html#a5ac7e2c350bc592cf2fa7b9935b00ef5" > json_tokener_new()< / a > < / td > < / tr >
< tr > < td class = "paramname" > str< / td > < td > an string with any valid JSON expression, or portion of. This does not need to be null terminated. < / td > < / tr >
< tr > < td class = "paramname" > len< / td > < td > the length of str < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a735f2dc755d57ed5c5b807aaaaef3b14" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > struct < a class = "el" href = "structjson__object.html" > json_object< / a > * json_tokener_parse_verbose < / td >
< td > (< / td >
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > str< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > enum < a class = "el" href = "json__tokener_8h.html#a0a31f0df8a532ef8be5c09ba40eacb59" > json_tokener_error< / a > *  < / td >
< td class = "paramname" > < em > error< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a238649a59737be5152d525aeaf4153ab" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > void json_tokener_reset < / td >
< td > (< / td >
< td class = "paramtype" > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *  < / td >
< td class = "paramname" > < em > tok< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2018-03-05 23:18:59 -05:00
< a class = "anchor" id = "a7e7a0c0c9dc79e5e47b2608bb8aad7b7" > < / a >
2017-12-07 18:06:19 -05:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "json__object_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e" > JSON_EXPORT< / a > void json_tokener_set_flags < / td >
< td > (< / td >
< td class = "paramtype" > struct < a class = "el" href = "structjson__tokener.html" > json_tokener< / a > *  < / td >
< td class = "paramname" > < em > tok< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > flags< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Set flags that control how parsing will be done. < / p >
< / div >
< / div >
< / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
2018-03-05 23:18:59 -05:00
Generated on Mon Mar 5 2018 23:17:09 for json-c by   < a href = "http://www.doxygen.org/index.html" >
2017-12-07 18:06:19 -05:00
< img class = "footer" src = "doxygen.png" alt = "doxygen" / >
2018-03-05 23:18:59 -05:00
< / a > 1.8.8
2017-12-07 18:06:19 -05:00
< / small > < / address >
< / body >
< / html >