1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599
|
<!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"/>
<title>json-c: /home/erh/json-c-0.15/json_object.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;">
<td style="padding-left: 0.5em;">
<div id="projectname">json-c
 <span id="projectnumber">0.15</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
<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>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> |
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">json_object.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Core json-c API. Start here, or with <a class="el" href="json__tokener_8h.html" title="Methods to parse an input string into a tree of json_object objects.">json_tokener.h</a>.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a878f59e029f19db79ff9eb41fdcf4c6d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a878f59e029f19db79ff9eb41fdcf4c6d">JSON_C_CONST_FUNCTION</a>(func)   func</td></tr>
<tr class="separator:a878f59e029f19db79ff9eb41fdcf4c6d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a268a63dd1b2e6d81559e268a4529e9bf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a268a63dd1b2e6d81559e268a4529e9bf">JSON_OBJECT_DEF_HASH_ENTRIES</a>   16</td></tr>
<tr class="separator:a268a63dd1b2e6d81559e268a4529e9bf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3294cb92765cdeb497cfd346644d1059"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a3294cb92765cdeb497cfd346644d1059">JSON_C_TO_STRING_PLAIN</a>   0</td></tr>
<tr class="separator:a3294cb92765cdeb497cfd346644d1059"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa821746c8668e6ad62bed90ec9e00103"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#aa821746c8668e6ad62bed90ec9e00103">JSON_C_TO_STRING_SPACED</a>   (1 << 0)</td></tr>
<tr class="separator:aa821746c8668e6ad62bed90ec9e00103"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2025bc677c35f130e117dfda5bf1ef73"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a2025bc677c35f130e117dfda5bf1ef73">JSON_C_TO_STRING_PRETTY</a>   (1 << 1)</td></tr>
<tr class="separator:a2025bc677c35f130e117dfda5bf1ef73"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afc1486af21f6b1653c6f523025bdfd3b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#afc1486af21f6b1653c6f523025bdfd3b">JSON_C_TO_STRING_PRETTY_TAB</a>   (1 << 3)</td></tr>
<tr class="separator:afc1486af21f6b1653c6f523025bdfd3b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a34f027c147babf69fc530d088f2b49b0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a34f027c147babf69fc530d088f2b49b0">JSON_C_TO_STRING_NOZERO</a>   (1 << 2)</td></tr>
<tr class="separator:a34f027c147babf69fc530d088f2b49b0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5c11d72c55f3ab7c088f19e7bf118163"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a5c11d72c55f3ab7c088f19e7bf118163">JSON_C_TO_STRING_NOSLASHESCAPE</a>   (1 << 4)</td></tr>
<tr class="separator:a5c11d72c55f3ab7c088f19e7bf118163"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8cd01c484155ac99043a35b7c85ae411"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8cd01c484155ac99043a35b7c85ae411">JSON_C_OBJECT_ADD_KEY_IS_NEW</a>   (1 << 1)</td></tr>
<tr class="separator:a8cd01c484155ac99043a35b7c85ae411"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a134ffafc6116799a20134dc7646b5a37"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a134ffafc6116799a20134dc7646b5a37">JSON_C_OBJECT_KEY_IS_CONSTANT</a>   (1 << 2)</td></tr>
<tr class="separator:a134ffafc6116799a20134dc7646b5a37"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a45837b8c6564f9e605f8a2bc76243750"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a45837b8c6564f9e605f8a2bc76243750">JSON_C_OPTION_GLOBAL</a>   (0)</td></tr>
<tr class="separator:a45837b8c6564f9e605f8a2bc76243750"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a50d1490598fe476d7a53e204e02cdc9d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a50d1490598fe476d7a53e204e02cdc9d">JSON_C_OPTION_THREAD</a>   (1)</td></tr>
<tr class="separator:a50d1490598fe476d7a53e204e02cdc9d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acf5f514a9e0061c10fc08055762639ee"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#acf5f514a9e0061c10fc08055762639ee">json_object_object_foreach</a>(obj, key, val)</td></tr>
<tr class="separator:acf5f514a9e0061c10fc08055762639ee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a71f07006c12d78f7bbf4cb716a5af3a6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a71f07006c12d78f7bbf4cb716a5af3a6">json_object_object_foreachC</a>(obj, iter)</td></tr>
<tr class="separator:a71f07006c12d78f7bbf4cb716a5af3a6"><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:af4562514916f62ea56adf752ada10b52"><td class="memItemLeft" align="right" valign="top">typedef int( </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#af4562514916f62ea56adf752ada10b52">json_c_shallow_copy_fn</a> )(<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *src, <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *parent, const char *key, size_t index, <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> **dst)</td></tr>
<tr class="separator:af4562514916f62ea56adf752ada10b52"><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:a675aa3a9cced685dbfd1c1a770a0c3e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a675aa3a9cced685dbfd1c1a770a0c3e4">json_object_get</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a675aa3a9cced685dbfd1c1a770a0c3e4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afabf61f932cd64a4122ca8092452eed5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:afabf61f932cd64a4122ca8092452eed5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ab506a3d8f4ba5eb6a12ce0a6bbd37b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8ab506a3d8f4ba5eb6a12ce0a6bbd37b">json_object_is_type</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, enum <a class="el" href="json__types_8h.html#ac75c61993722a9b8aaa44704072ec06c">json_type</a> type)</td></tr>
<tr class="separator:a8ab506a3d8f4ba5eb6a12ce0a6bbd37b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af256a3a7910e271a2b9735e5044c3827"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> enum <a class="el" href="json__types_8h.html#ac75c61993722a9b8aaa44704072ec06c">json_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#af256a3a7910e271a2b9735e5044c3827">json_object_get_type</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:af256a3a7910e271a2b9735e5044c3827"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab7390c22baa1700d977c2af6b22d43a4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ab7390c22baa1700d977c2af6b22d43a4">json_object_to_json_string</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:ab7390c22baa1700d977c2af6b22d43a4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9db613127bd4ef7db42307e43a85fc1b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int flags)</td></tr>
<tr class="separator:a9db613127bd4ef7db42307e43a85fc1b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:add3770a3ba3d01a8f9adedfcd6bd8dbb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#add3770a3ba3d01a8f9adedfcd6bd8dbb">json_object_to_json_string_length</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int flags, size_t *length)</td></tr>
<tr class="separator:add3770a3ba3d01a8f9adedfcd6bd8dbb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae925f3ec0f61cba5ea3dd50e0315f194"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ae925f3ec0f61cba5ea3dd50e0315f194">json_object_get_userdata</a> (<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *jso)</td></tr>
<tr class="separator:ae925f3ec0f61cba5ea3dd50e0315f194"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ee4281ccd123c62878e931a0a3bc43b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a4ee4281ccd123c62878e931a0a3bc43b">json_object_set_userdata</a> (<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *jso, void *userdata, <a class="el" href="json__types_8h.html#aa647d7c567a06abe1a1a511f6d6860e4">json_object_delete_fn</a> *user_delete)</td></tr>
<tr class="separator:a4ee4281ccd123c62878e931a0a3bc43b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a889345512a214b8f78f6a73561523c7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer</a> (<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *jso, <a class="el" href="json__types_8h.html#af84078100a9025df418f31626ea866fa">json_object_to_json_string_fn</a> *to_string_func, void *userdata, <a class="el" href="json__types_8h.html#aa647d7c567a06abe1a1a511f6d6860e4">json_object_delete_fn</a> *user_delete)</td></tr>
<tr class="separator:a889345512a214b8f78f6a73561523c7c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a68c383f54544fca19b5f2425be397600"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a68c383f54544fca19b5f2425be397600">json_object_new_object</a> (void)</td></tr>
<tr class="separator:a68c383f54544fca19b5f2425be397600"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2caa52ae1863bd073444f3737138a4db"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="structlh__table.html">lh_table</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a2caa52ae1863bd073444f3737138a4db"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad59a0ad2ec914a5eef90af53acae06d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ad59a0ad2ec914a5eef90af53acae06d9">json_object_object_length</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:ad59a0ad2ec914a5eef90af53acae06d9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a922b2d76c73da57174beec82d471743b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a922b2d76c73da57174beec82d471743b">JSON_C_CONST_FUNCTION</a> (<a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> size_t json_c_object_sizeof(void))</td></tr>
<tr class="separator:a922b2d76c73da57174beec82d471743b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a27bd808a022251059a43f1f6370441cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a27bd808a022251059a43f1f6370441cd">json_object_object_add</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *key, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *val)</td></tr>
<tr class="separator:a27bd808a022251059a43f1f6370441cd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a57d3e444dd7db6b4510d21bf3716a002"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a57d3e444dd7db6b4510d21bf3716a002">json_object_object_add_ex</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *const key, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *const val, const unsigned opts)</td></tr>
<tr class="separator:a57d3e444dd7db6b4510d21bf3716a002"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1a097805abb53b4c8a60d573730a8939"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *key)</td></tr>
<tr class="separator:a1a097805abb53b4c8a60d573730a8939"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a90d5f16d58636f01d2ed1a6030c7366a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a90d5f16d58636f01d2ed1a6030c7366a">json_object_object_get_ex</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *key, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> **value)</td></tr>
<tr class="separator:a90d5f16d58636f01d2ed1a6030c7366a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac6605fdafca20bd5d33c84f4f80a3bda"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ac6605fdafca20bd5d33c84f4f80a3bda">json_object_object_del</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *key)</td></tr>
<tr class="separator:ac6605fdafca20bd5d33c84f4f80a3bda"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a84f7f8c0774c4600d958561d7548d649"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a84f7f8c0774c4600d958561d7548d649">json_object_new_array</a> (void)</td></tr>
<tr class="separator:a84f7f8c0774c4600d958561d7548d649"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a62af9fb3b02fb153190369d949394b26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a62af9fb3b02fb153190369d949394b26">json_object_new_array_ext</a> (int initial_size)</td></tr>
<tr class="separator:a62af9fb3b02fb153190369d949394b26"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a23d20e3f886c1638a7116be66b7b5ec2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="structarray__list.html">array_list</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a23d20e3f886c1638a7116be66b7b5ec2">json_object_get_array</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a23d20e3f886c1638a7116be66b7b5ec2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab9ea8f9c72d5adf83fdcbfe69f97fa44"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ab9ea8f9c72d5adf83fdcbfe69f97fa44">json_object_array_length</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:ab9ea8f9c72d5adf83fdcbfe69f97fa44"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5584e2f2051cd1faa7fafd07ba888fd1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a5584e2f2051cd1faa7fafd07ba888fd1">json_object_array_sort</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *jso, int(*sort_fn)(const void *, const void *))</td></tr>
<tr class="separator:a5584e2f2051cd1faa7fafd07ba888fd1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed353084ed3ad84e7b7575afbe7e719d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#aed353084ed3ad84e7b7575afbe7e719d">json_object_array_bsearch</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *key, const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *jso, int(*sort_fn)(const void *, const void *))</td></tr>
<tr class="separator:aed353084ed3ad84e7b7575afbe7e719d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a18cdd9a7455e09f36cdf6e5756b7f586"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a18cdd9a7455e09f36cdf6e5756b7f586">json_object_array_add</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *val)</td></tr>
<tr class="separator:a18cdd9a7455e09f36cdf6e5756b7f586"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1ac0ccdbc13a25da7d8b2dc9e421dfad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a1ac0ccdbc13a25da7d8b2dc9e421dfad">json_object_array_put_idx</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, size_t idx, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *val)</td></tr>
<tr class="separator:a1ac0ccdbc13a25da7d8b2dc9e421dfad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a676711a76545d4ec65cc75f100f5fd19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, size_t idx)</td></tr>
<tr class="separator:a676711a76545d4ec65cc75f100f5fd19"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a722eca9f578704d3af38b97549242c1f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a722eca9f578704d3af38b97549242c1f">json_object_array_del_idx</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, size_t idx, size_t count)</td></tr>
<tr class="separator:a722eca9f578704d3af38b97549242c1f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a95552402a95c9470b230052d92270247"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a95552402a95c9470b230052d92270247">json_object_array_shrink</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *jso, int empty_slots)</td></tr>
<tr class="separator:a95552402a95c9470b230052d92270247"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2e290acd80e72cca745f89fb4600fb78"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a2e290acd80e72cca745f89fb4600fb78">json_object_new_boolean</a> (<a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> b)</td></tr>
<tr class="separator:a2e290acd80e72cca745f89fb4600fb78"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac003fb99db7ecd674bb16d983d2f92ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ac003fb99db7ecd674bb16d983d2f92ee">json_object_get_boolean</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:ac003fb99db7ecd674bb16d983d2f92ee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a23863c1503f3a8dd8a460a6405da0a65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a23863c1503f3a8dd8a460a6405da0a65">json_object_set_boolean</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> new_value)</td></tr>
<tr class="separator:a23863c1503f3a8dd8a460a6405da0a65"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae92f0770fb4b3c884ce35de52d3d7de8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ae92f0770fb4b3c884ce35de52d3d7de8">json_object_new_int</a> (int32_t i)</td></tr>
<tr class="separator:ae92f0770fb4b3c884ce35de52d3d7de8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7847f74494645c2b076505c37cc4cb93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a7847f74494645c2b076505c37cc4cb93">json_object_new_int64</a> (int64_t i)</td></tr>
<tr class="separator:a7847f74494645c2b076505c37cc4cb93"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa602ee5f6182b35f3f75a927320b4efd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#aa602ee5f6182b35f3f75a927320b4efd">json_object_new_uint64</a> (uint64_t i)</td></tr>
<tr class="separator:aa602ee5f6182b35f3f75a927320b4efd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8c56dc58a02f92cd6789ba5dcb9fe7b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a8c56dc58a02f92cd6789ba5dcb9fe7b1">json_object_get_int</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a8c56dc58a02f92cd6789ba5dcb9fe7b1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ab3568f12e01fd2967e765a72456caa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a4ab3568f12e01fd2967e765a72456caa">json_object_set_int</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int new_value)</td></tr>
<tr class="separator:a4ab3568f12e01fd2967e765a72456caa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a25691322b2d1ab24a3797e5752eb659f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a25691322b2d1ab24a3797e5752eb659f">json_object_int_inc</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int64_t val)</td></tr>
<tr class="separator:a25691322b2d1ab24a3797e5752eb659f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1a14750b3af4df18ec8dc93b090a8e8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a1a14750b3af4df18ec8dc93b090a8e8a">json_object_get_int64</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a1a14750b3af4df18ec8dc93b090a8e8a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a82c27579b6d25d9d0eb3b72758d8b71d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a82c27579b6d25d9d0eb3b72758d8b71d">json_object_get_uint64</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a82c27579b6d25d9d0eb3b72758d8b71d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7d3948600dde732abed0e261264ef53a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a7d3948600dde732abed0e261264ef53a">json_object_set_int64</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, int64_t new_value)</td></tr>
<tr class="separator:a7d3948600dde732abed0e261264ef53a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9900aa9a425e6f14e295b298460b65d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a9900aa9a425e6f14e295b298460b65d4">json_object_set_uint64</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, uint64_t new_value)</td></tr>
<tr class="separator:a9900aa9a425e6f14e295b298460b65d4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a594a093bafb9091f843da3197e0638aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a594a093bafb9091f843da3197e0638aa">json_object_new_double</a> (double d)</td></tr>
<tr class="separator:a594a093bafb9091f843da3197e0638aa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae49671c026fe1ada370a75321e4e65f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ae49671c026fe1ada370a75321e4e65f6">json_object_new_double_s</a> (double d, const char *ds)</td></tr>
<tr class="separator:ae49671c026fe1ada370a75321e4e65f6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac099272b46fde595831118720b155656"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ac099272b46fde595831118720b155656">json_c_set_serialization_double_format</a> (const char *double_format, int global_or_thread)</td></tr>
<tr class="separator:ac099272b46fde595831118720b155656"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ada262c62364e3819b6a64b1e3a632336"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ada262c62364e3819b6a64b1e3a632336">json_object_double_to_json_string</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *jso, struct <a class="el" href="structprintbuf.html">printbuf</a> *pb, int level, int flags)</td></tr>
<tr class="separator:ada262c62364e3819b6a64b1e3a632336"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a94a70cff6a14398b581b7b10b0792c5b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> double </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a94a70cff6a14398b581b7b10b0792c5b">json_object_get_double</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a94a70cff6a14398b581b7b10b0792c5b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3a7b7ce585565558cb69dad8d45d7757"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a3a7b7ce585565558cb69dad8d45d7757">json_object_set_double</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, double new_value)</td></tr>
<tr class="separator:a3a7b7ce585565558cb69dad8d45d7757"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7b7b5302b3903c9347eeb1f4a64d657b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a7b7b5302b3903c9347eeb1f4a64d657b">json_object_new_string</a> (const char *s)</td></tr>
<tr class="separator:a7b7b5302b3903c9347eeb1f4a64d657b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a778a1aa34a508d08daac3bdb83e24b52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a778a1aa34a508d08daac3bdb83e24b52">json_object_new_string_len</a> (const char *s, const int len)</td></tr>
<tr class="separator:a778a1aa34a508d08daac3bdb83e24b52"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ee29ca8d79896e15007131527f6002e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a9ee29ca8d79896e15007131527f6002e">json_object_get_string</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:a9ee29ca8d79896e15007131527f6002e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac1d1f95a27a5e5d93bb66a8adfc1a2f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ac1d1f95a27a5e5d93bb66a8adfc1a2f4">json_object_get_string_len</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
<tr class="separator:ac1d1f95a27a5e5d93bb66a8adfc1a2f4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac35013e51cdc0651512801c947df431c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ac35013e51cdc0651512801c947df431c">json_object_set_string</a> (<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *new_value)</td></tr>
<tr class="separator:ac35013e51cdc0651512801c947df431c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae48707a0c8689e14aaa3a9b831db27fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#ae48707a0c8689e14aaa3a9b831db27fc">json_object_set_string_len</a> (<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj, const char *new_value, int len)</td></tr>
<tr class="separator:ae48707a0c8689e14aaa3a9b831db27fc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a29e23b5be729c679960242b3b81bcde0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a29e23b5be729c679960242b3b81bcde0">json_object_new_null</a> (void)</td></tr>
<tr class="separator:a29e23b5be729c679960242b3b81bcde0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5a1d4640525e0217059868e312f20579"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a5a1d4640525e0217059868e312f20579">json_object_equal</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj1, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj2)</td></tr>
<tr class="separator:a5a1d4640525e0217059868e312f20579"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaac16505f13bc56accfad82604d8bcdc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#aaac16505f13bc56accfad82604d8bcdc">json_object_deep_copy</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *src, struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> **dst, <a class="el" href="json__object_8h.html#af4562514916f62ea56adf752ada10b52">json_c_shallow_copy_fn</a> *shallow_copy)</td></tr>
<tr class="separator:aaac16505f13bc56accfad82604d8bcdc"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:aff3190c34884bea3b4e65e286b973d89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#aa647d7c567a06abe1a1a511f6d6860e4">json_object_delete_fn</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#aff3190c34884bea3b4e65e286b973d89">json_object_free_userdata</a></td></tr>
<tr class="separator:aff3190c34884bea3b4e65e286b973d89"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a56091ddbd2ec6d6200558cbeff1b86b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <br class="typebreak"/>
<a class="el" href="json__types_8h.html#af84078100a9025df418f31626ea866fa">json_object_to_json_string_fn</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a56091ddbd2ec6d6200558cbeff1b86b8">json_object_userdata_to_json_string</a></td></tr>
<tr class="separator:a56091ddbd2ec6d6200558cbeff1b86b8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a86ea08e75ddf054742bf806a3bc3f983"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__object_8h.html#af4562514916f62ea56adf752ada10b52">json_c_shallow_copy_fn</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="json__object_8h.html#a86ea08e75ddf054742bf806a3bc3f983">json_c_shallow_copy_default</a></td></tr>
<tr class="separator:a86ea08e75ddf054742bf806a3bc3f983"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Core json-c API. Start here, or with <a class="el" href="json__tokener_8h.html" title="Methods to parse an input string into a tree of json_object objects.">json_tokener.h</a>. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a878f59e029f19db79ff9eb41fdcf4c6d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_CONST_FUNCTION</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">func </td><td>)</td>
<td>   func</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a8cd01c484155ac99043a35b7c85ae411"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_OBJECT_ADD_KEY_IS_NEW   (1 << 1)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag for the json_object_object_add_ex function which causes the value to be added without a check if it already exists. Note: it is the responsibility of the caller to ensure that no key is added multiple times. If this is done, results are unpredictable. While this option is somewhat dangerous, it permits potentially large performance savings in code that knows for sure the key values are unique (e.g. because the code adds a well-known set of constant key values). </p>
</div>
</div>
<a class="anchor" id="a134ffafc6116799a20134dc7646b5a37"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_OBJECT_KEY_IS_CONSTANT   (1 << 2)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag for the json_object_object_add_ex function which flags the key as being constant memory. This means that the key will NOT be copied via strdup(), resulting in a potentially huge performance win (malloc, strdup and free are usually performance hogs). It is acceptable to use this flag for keys in non-constant memory blocks if the caller ensure that the memory holding the key lives longer than the corresponding json object. However, this is somewhat dangerous and should only be done if really justified. The general use-case for this flag is cases where the key is given as a real constant value in the function call, e.g. as in json_object_object_add_ex(obj, "ip", json, JSON_C_OBJECT_KEY_IS_CONSTANT); </p>
</div>
</div>
<a class="anchor" id="a45837b8c6564f9e605f8a2bc76243750"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_OPTION_GLOBAL   (0)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the global value of an option, which will apply to all current and future threads that have not set a thread-local value.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#ac099272b46fde595831118720b155656">json_c_set_serialization_double_format</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a50d1490598fe476d7a53e204e02cdc9d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_OPTION_THREAD   (1)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread-local value of an option, overriding the global value. This will fail if json-c is not compiled with threading enabled, and with the __thread specifier (or equivalent) available.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#ac099272b46fde595831118720b155656">json_c_set_serialization_double_format</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a5c11d72c55f3ab7c088f19e7bf118163"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_TO_STRING_NOSLASHESCAPE   (1 << 4)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Don't escape forward slashes. </p>
</div>
</div>
<a class="anchor" id="a34f027c147babf69fc530d088f2b49b0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_TO_STRING_NOZERO   (1 << 2)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag to drop trailing zero for float values </p>
</div>
</div>
<a class="anchor" id="a3294cb92765cdeb497cfd346644d1059"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_TO_STRING_PLAIN   0</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag for the <a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext()</a> and <a class="el" href="json__util_8h.html#a68a7385c555cf21797e361d1d4de3441">json_object_to_file_ext()</a> functions which causes the output to have no extra whitespace or formatting applied. </p>
</div>
</div>
<a class="anchor" id="a2025bc677c35f130e117dfda5bf1ef73"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_TO_STRING_PRETTY   (1 << 1)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag for the <a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext()</a> and <a class="el" href="json__util_8h.html#a68a7385c555cf21797e361d1d4de3441">json_object_to_file_ext()</a> functions which causes the output to be formatted.</p>
<p>See the "Two Space Tab" option at <a href="http://jsonformatter.curiousconcept.com/">http://jsonformatter.curiousconcept.com/</a> for an example of the format. </p>
</div>
</div>
<a class="anchor" id="afc1486af21f6b1653c6f523025bdfd3b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_TO_STRING_PRETTY_TAB   (1 << 3)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag for the <a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext()</a> and <a class="el" href="json__util_8h.html#a68a7385c555cf21797e361d1d4de3441">json_object_to_file_ext()</a> functions which causes the output to be formatted.</p>
<p>Instead of a "Two Space Tab" this gives a single tab character. </p>
</div>
</div>
<a class="anchor" id="aa821746c8668e6ad62bed90ec9e00103"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_C_TO_STRING_SPACED   (1 << 0)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag for the <a class="el" href="json__object_8h.html#a9db613127bd4ef7db42307e43a85fc1b">json_object_to_json_string_ext()</a> and <a class="el" href="json__util_8h.html#a68a7385c555cf21797e361d1d4de3441">json_object_to_file_ext()</a> functions which causes the output to have minimal whitespace inserted to make things slightly more readable. </p>
</div>
</div>
<a class="anchor" id="a268a63dd1b2e6d81559e268a4529e9bf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define JSON_OBJECT_DEF_HASH_ENTRIES   16</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="acf5f514a9e0061c10fc08055762639ee"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define json_object_object_foreach</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">obj, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">key, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">val </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordtype">char</span> *key = NULL; \</div>
<div class="line"> struct <a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *val = NULL; \</div>
<div class="line"> struct <a class="code" href="structlh__entry.html">lh_entry</a> *entry##key; \</div>
<div class="line"> struct <a class="code" href="structlh__entry.html">lh_entry</a> *entry_next##key = NULL; \</div>
<div class="line"> for (entry##key = <a class="code" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object</a>(obj)->head; \</div>
<div class="line"> (entry##key ? (key = (<span class="keywordtype">char</span> *)<a class="code" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">lh_entry_k</a>(entry##key), \</div>
<div class="line"> val = (<span class="keyword">struct </span><a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *)<a class="code" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">lh_entry_v</a>(entry##key), \</div>
<div class="line"> entry_next##key = entry##key->next, entry##key) \</div>
<div class="line"> : 0); \</div>
<div class="line"> entry##key = entry_next##key)</div>
</div><!-- fragment --><p>Iterate through all keys and values of an object.</p>
<p>Adding keys to the object while iterating is NOT allowed.</p>
<p>Deleting an existing key, or replacing an existing key with a new value IS allowed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">key</td><td>the local name for the char* key variable defined in the body </td></tr>
<tr><td class="paramname">val</td><td>the local name for the json_object* object variable defined in the body </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a71f07006c12d78f7bbf4cb716a5af3a6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define json_object_object_foreachC</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">obj, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">iter </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">for</span> (iter.entry = <a class="code" href="json__object_8h.html#a2caa52ae1863bd073444f3737138a4db">json_object_get_object</a>(obj)->head; \</div>
<div class="line"> (iter.entry ? (iter.key = (<span class="keywordtype">char</span> *)<a class="code" href="linkhash_8h.html#a7579ce28b8366fc9b8656f14270aa3aa">lh_entry_k</a>(iter.entry), \</div>
<div class="line"> iter.val = (<span class="keyword">struct </span><a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a> *)<a class="code" href="linkhash_8h.html#a0d4052ccfd8c5d351a9c1d3ba07671b3">lh_entry_v</a>(iter.entry), iter.entry) \</div>
<div class="line"> : 0); \</div>
<div class="line"> iter.entry = iter.entry->next)</div>
</div><!-- fragment --><p>Iterate through all keys and values of an object (ANSI C Safe) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">iter</td><td>the object iterator, use type <a class="el" href="structjson__object__iter.html">json_object_iter</a> </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="af4562514916f62ea56adf752ada10b52"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int( json_c_shallow_copy_fn)(<a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *src, <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *parent, const char *key, size_t index, <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> **dst)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Perform a shallow copy of src into *dst as part of an overall <a class="el" href="json__object_8h.html#aaac16505f13bc56accfad82604d8bcdc">json_object_deep_copy()</a>.</p>
<p>If src is part of a containing object or array, parent will be non-NULL, and key or index will be provided. When shallow_copy is called *dst will be NULL, and must be non-NULL when it returns. src will never be NULL.</p>
<p>If shallow_copy sets the serializer on an object, return 2 to indicate to json_object_deep_copy that it should not attempt to use the standard userdata copy function.</p>
<dl class="section return"><dt>Returns</dt><dd>On success 1 or 2, -1 on errors </dd></dl>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a922b2d76c73da57174beec82d471743b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">JSON_C_CONST_FUNCTION </td>
<td>(</td>
<td class="paramtype"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> size_t  </td>
<td class="paramname"><em>json_c_object_sizeof</em>void</td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the sizeof (struct json_object). </p>
<dl class="section return"><dt>Returns</dt><dd>a size_t with the sizeof (struct json_object) </dd></dl>
</div>
</div>
<a class="anchor" id="ac099272b46fde595831118720b155656"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_c_set_serialization_double_format </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>double_format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>global_or_thread</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a global or thread-local json-c option, depending on whether JSON_C_OPTION_GLOBAL or JSON_C_OPTION_THREAD is passed. Thread-local options default to undefined, and inherit from the global value, even if the global value is changed after the thread is created. Attempting to set thread-local options when threading is not compiled in will result in an error. Be sure to check the return value.</p>
<p>double_format is a "%g" printf format, such as "%.20g"</p>
<dl class="section return"><dt>Returns</dt><dd>-1 on errors, 0 on success. </dd></dl>
</div>
</div>
<a class="anchor" id="a18cdd9a7455e09f36cdf6e5756b7f586"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_array_add </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>val</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add an element to the end of a json_object of type json_type_array</p>
<p>The reference count will <em>not</em> be incremented. This is to make adding fields to objects in code more compact. If you want to retain a reference to an added object you must wrap the passed object with json_object_get</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">val</td><td>the json_object to be added </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aed353084ed3ad84e7b7575afbe7e719d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_array_bsearch </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>jso</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int(*)(const void *, const void *) </td>
<td class="paramname"><em>sort_fn</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Binary search a sorted array for a specified key object.</p>
<p>It depends on your compare function what's sufficient as a key. Usually you create some dummy object with the parameter compared in it, to identify the right item you're actually looking for.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#a5584e2f2051cd1faa7fafd07ba888fd1">json_object_array_sort()</a> for hints on the compare function.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>a dummy json_object with the right key </td></tr>
<tr><td class="paramname">jso</td><td>the array object we're searching </td></tr>
<tr><td class="paramname">sort_fn</td><td>the sort/compare function</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the wanted json_object instance </dd></dl>
</div>
</div>
<a class="anchor" id="a722eca9f578704d3af38b97549242c1f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_array_del_idx </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>idx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>count</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete an elements from a specified index in an array (a json_object of type json_type_array)</p>
<p>The reference count will be decremented for each of the deleted objects. If there are no more owners of an element that is being deleted, then the value is freed. Otherwise, the reference to the value will remain in memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">idx</td><td>the index to start deleting elements at </td></tr>
<tr><td class="paramname">count</td><td>the number of elements to delete </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the elements were successfully deleted </dd></dl>
</div>
</div>
<a class="anchor" id="a676711a76545d4ec65cc75f100f5fd19"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_array_get_idx </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>idx</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the element at specified index of array <code>obj</code> (which must be a json_object of type json_type_array)</p>
<p><em>No</em> reference counts will be changed, and ownership of the returned object remains with <code>obj</code>. See <a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a> for additional implications of this behavior.</p>
<p>Calling this with anything other than a json_type_array will trigger an assert.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">idx</td><td>the index to get the element at </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the json_object at the specified index (or NULL) </dd></dl>
</div>
</div>
<a class="anchor" id="ab9ea8f9c72d5adf83fdcbfe69f97fa44"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> size_t json_object_array_length </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the length of a json_object of type json_type_array </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an int </dd></dl>
</div>
</div>
<a class="anchor" id="a1ac0ccdbc13a25da7d8b2dc9e421dfad"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_array_put_idx </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>idx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>val</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Insert or replace an element at a specified index in an array (a json_object of type json_type_array)</p>
<p>The reference count will <em>not</em> be incremented. This is to make adding fields to objects in code more compact. If you want to retain a reference to an added object you must wrap the passed object with json_object_get</p>
<p>The reference count of a replaced object will be decremented.</p>
<p>The array size will be automatically be expanded to the size of the index if the index is larger than the current size.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">idx</td><td>the index to insert the element at </td></tr>
<tr><td class="paramname">val</td><td>the json_object to be added </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a95552402a95c9470b230052d92270247"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_array_shrink </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>jso</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>empty_slots</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shrink the internal memory allocation of the array to just enough to fit the number of elements in it, plus empty_slots.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>the json_object instance, must be json_type_array </td></tr>
<tr><td class="paramname">empty_slots</td><td>the number of empty slots to leave allocated </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a5584e2f2051cd1faa7fafd07ba888fd1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void json_object_array_sort </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>jso</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int(*)(const void *, const void *) </td>
<td class="paramname"><em>sort_fn</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sorts the elements of jso of type json_type_array</p>
<p>Pointers to the json_object pointers will be passed as the two arguments to sort_fn</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>the json_object instance </td></tr>
<tr><td class="paramname">sort_fn</td><td>a sorting function </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aaac16505f13bc56accfad82604d8bcdc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_deep_copy </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> ** </td>
<td class="paramname"><em>dst</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="json__object_8h.html#af4562514916f62ea56adf752ada10b52">json_c_shallow_copy_fn</a> * </td>
<td class="paramname"><em>shallow_copy</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy the contents of the JSON object. The destination object must be initialized to NULL, to make sure this function won't overwrite an existing JSON object.</p>
<p>This does roughly the same thing as <code>json_tokener_parse(json_object_get_string(src))</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">src</td><td>source JSON object whose contents will be copied </td></tr>
<tr><td class="paramname">dst</td><td>pointer to the destination object where the contents of <code>src</code>; make sure this pointer is initialized to NULL </td></tr>
<tr><td class="paramname">shallow_copy</td><td>an optional function to copy individual objects, needed when custom serializers are in use. See also json_object set_serializer.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if the copy went well, -1 if an error occured during copy or if the destination pointer is non-NULL </dd></dl>
</div>
</div>
<a class="anchor" id="ada262c62364e3819b6a64b1e3a632336"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_double_to_json_string </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>jso</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structprintbuf.html">printbuf</a> * </td>
<td class="paramname"><em>pb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>level</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>Serialize a json_object of type json_type_double to a string.</p>
<p>This function isn't meant to be called directly. Instead, you can set a custom format string for the serialization of this double using the following call (where "%.17g" actually is the default):</p>
<div class="fragment"><div class="line">jso = <a class="code" href="json__object_8h.html#a594a093bafb9091f843da3197e0638aa">json_object_new_double</a>(d);</div>
<div class="line"><a class="code" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer</a>(jso, <a class="code" href="json__object_8h.html#ada262c62364e3819b6a64b1e3a632336">json_object_double_to_json_string</a>,</div>
<div class="line"> <span class="stringliteral">"%.17g"</span>, NULL);</div>
</div><!-- fragment --><dl class="section see"><dt>See Also</dt><dd>printf(3) man page for format strings</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>The json_type_double object that is serialized. </td></tr>
<tr><td class="paramname">pb</td><td>The destination buffer. </td></tr>
<tr><td class="paramname">level</td><td>Ignored. </td></tr>
<tr><td class="paramname">flags</td><td>Ignored. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a5a1d4640525e0217059868e312f20579"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_equal </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if two json_object's are equal</p>
<p>If the passed objects are equal 1 will be returned. Equality is defined as follows:</p>
<ul>
<li>json_objects of different types are never equal</li>
<li>json_objects of the same primitive type are equal if the c-representation of their value is equal</li>
<li>json-arrays are considered equal if all values at the same indices are equal (same order)</li>
<li>Complex json_objects are considered equal if all contained objects referenced by their key are equal, regardless their order.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj1</td><td>the first json_object instance </td></tr>
<tr><td class="paramname">obj2</td><td>the second json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether both objects are equal or not </dd></dl>
</div>
</div>
<a class="anchor" id="a675aa3a9cced685dbfd1c1a770a0c3e4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_get </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Increment the reference count of json_object, thereby taking ownership of it.</p>
<p>Cases where you might need to increase the refcount include:</p>
<ul>
<li>Using an object field or array index (retrieved through <code><a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a></code> or <code><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a></code>) beyond the lifetime of the parent object.</li>
<li>Detaching an object field or array index from its parent object (using <code><a class="el" href="json__object_8h.html#ac6605fdafca20bd5d33c84f4f80a3bda">json_object_object_del()</a></code> or <code><a class="el" href="json__object_8h.html#a722eca9f578704d3af38b97549242c1f">json_object_array_del_idx()</a></code>)</li>
<li>Sharing a json_object with multiple (not necesarily parallel) threads of execution that all expect to free it (with <code><a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a></code>) when they're done.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> </dd>
<dd>
<a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a> </dd>
<dd>
<a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a23d20e3f886c1638a7116be66b7b5ec2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="structarray__list.html">array_list</a>* json_object_get_array </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the arraylist of a json_object of type json_type_array </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an arraylist </dd></dl>
</div>
</div>
<a class="anchor" id="ac003fb99db7ecd674bb16d983d2f92ee"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> json_object_get_boolean </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the json_bool value of a json_object</p>
<p>The type is coerced to a json_bool if the passed object is not a json_bool. integer and double objects will return 0 if there value is zero or 1 otherwise. If the passed object is a string it will return 1 if it has a non zero length. If any other object type is passed 1 will be returned if the object is not NULL.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_bool </dd></dl>
</div>
</div>
<a class="anchor" id="a94a70cff6a14398b581b7b10b0792c5b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> double json_object_get_double </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the double floating point value of a json_object</p>
<p>The type is coerced to a double if the passed object is not a double. integer objects will return their double conversion. Strings will be parsed as a double. If no conversion exists then 0.0 is returned and errno is set to EINVAL. null is equivalent to 0 (no error values set)</p>
<p>If the value is too big to fit in a double, then the value is set to the closest infinity with errno set to ERANGE. If strings cannot be converted to their double value, then EINVAL is set & NaN is returned.</p>
<p>Arrays of length 0 are interpreted as 0 (with no error flags set). Arrays of length 1 are effectively cast to the equivalent object and converted using the above rules. All other arrays set the error to EINVAL & return NaN.</p>
<p>NOTE: Set errno to 0 directly before a call to this function to determine whether or not conversion was successful (it does not clear the value for you).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a double floating point number </dd></dl>
</div>
</div>
<a class="anchor" id="a8c56dc58a02f92cd6789ba5dcb9fe7b1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int32_t json_object_get_int </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the int value of a json_object</p>
<p>The type is coerced to a int if the passed object is not a int. double objects will return their integer conversion. Strings will be parsed as an integer. If no conversion exists then 0 is returned and errno is set to EINVAL. null is equivalent to 0 (no error values set)</p>
<p>Note that integers are stored internally as 64-bit values. If the value of too big or too small to fit into 32-bit, INT32_MAX or INT32_MIN are returned, respectively.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an int </dd></dl>
</div>
</div>
<a class="anchor" id="a1a14750b3af4df18ec8dc93b090a8e8a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int64_t json_object_get_int64 </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the int value of a json_object</p>
<p>The type is coerced to a int64 if the passed object is not a int64. double objects will return their int64 conversion. Strings will be parsed as an int64. If no conversion exists then 0 is returned.</p>
<p>NOTE: Set errno to 0 directly before a call to this function to determine whether or not conversion was successful (it does not clear the value for you).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an int64 </dd></dl>
</div>
</div>
<a class="anchor" id="a2caa52ae1863bd073444f3737138a4db"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="structlh__table.html">lh_table</a>* json_object_get_object </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the hashtable of a json_object of type json_type_object </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a linkhash </dd></dl>
</div>
</div>
<a class="anchor" id="a9ee29ca8d79896e15007131527f6002e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char* json_object_get_string </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the string value of a json_object</p>
<p>If the passed object is of type json_type_null (i.e. obj == NULL), NULL is returned.</p>
<p>If the passed object of type json_type_string, the string contents are returned.</p>
<p>Otherwise the JSON representation of the object is returned.</p>
<p>The returned string memory is managed by the json_object and will be freed when the reference count of the json_object drops to zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a string or NULL </dd></dl>
</div>
</div>
<a class="anchor" id="ac1d1f95a27a5e5d93bb66a8adfc1a2f4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_get_string_len </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the string length of a json_object</p>
<p>If the passed object is not of type json_type_string then zero will be returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>
</div>
</div>
<a class="anchor" id="af256a3a7910e271a2b9735e5044c3827"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> enum <a class="el" href="json__types_8h.html#ac75c61993722a9b8aaa44704072ec06c">json_type</a> json_object_get_type </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the type of the json_object. See also <a class="el" href="json__util_8h.html#a762aaf3df0a9c7b6919cdc1035348012">json_type_to_name()</a> to turn this into a string suitable, for instance, for logging.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>type being one of: json_type_null (i.e. obj == NULL), json_type_boolean, json_type_double, json_type_int, json_type_object, json_type_array, json_type_string </dd></dl>
</div>
</div>
<a class="anchor" id="a82c27579b6d25d9d0eb3b72758d8b71d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> uint64_t json_object_get_uint64 </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the uint value of a json_object</p>
<p>The type is coerced to a uint64 if the passed object is not a uint64. double objects will return their uint64 conversion. Strings will be parsed as an uint64. If no conversion exists then 0 is returned.</p>
<p>NOTE: Set errno to 0 directly before a call to this function to determine whether or not conversion was successful (it does not clear the value for you).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an uint64 </dd></dl>
</div>
</div>
<a class="anchor" id="ae925f3ec0f61cba5ea3dd50e0315f194"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void* json_object_get_userdata </td>
<td>(</td>
<td class="paramtype"><a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>jso</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the userdata set by <a class="el" href="json__object_8h.html#a4ee4281ccd123c62878e931a0a3bc43b">json_object_set_userdata()</a> or <a class="el" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>the object to return the userdata for </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a25691322b2d1ab24a3797e5752eb659f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_int_inc </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t </td>
<td class="paramname"><em>val</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Increment a json_type_int object by the given amount, which may be negative.</p>
<p>If the type of obj is not json_type_int then 0 is returned with no further action taken. If the addition would result in a overflow, the object value is set to INT64_MAX. If the addition would result in a underflow, the object value is set to INT64_MIN. Neither overflow nor underflow affect the return value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">val</td><td>the value to add </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the increment succeded, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a8ab506a3d8f4ba5eb6a12ce0a6bbd37b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_is_type </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="json__types_8h.html#ac75c61993722a9b8aaa44704072ec06c">json_type</a> </td>
<td class="paramname"><em>type</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if the json_object is of a given type </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">type</td><td>one of: json_type_null (i.e. obj == NULL), json_type_boolean, json_type_double, json_type_int, json_type_object, json_type_array, json_type_string </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a84f7f8c0774c4600d958561d7548d649"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_array </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_array with 32 slots allocated. If you know the array size you'll need ahead of time, use <a class="el" href="json__object_8h.html#a62af9fb3b02fb153190369d949394b26">json_object_new_array_ext()</a> instead. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#a62af9fb3b02fb153190369d949394b26">json_object_new_array_ext()</a> </dd>
<dd>
<a class="el" href="json__object_8h.html#a95552402a95c9470b230052d92270247">json_object_array_shrink()</a> </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_array </dd></dl>
</div>
</div>
<a class="anchor" id="a62af9fb3b02fb153190369d949394b26"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_array_ext </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>initial_size</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_array with the desired number of slots allocated. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#a95552402a95c9470b230052d92270247">json_object_array_shrink()</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">initial_size</td><td>the number of slots to allocate </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_array </dd></dl>
</div>
</div>
<a class="anchor" id="a2e290acd80e72cca745f89fb4600fb78"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_boolean </td>
<td>(</td>
<td class="paramtype"><a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> </td>
<td class="paramname"><em>b</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_boolean </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">b</td><td>a json_bool 1 or 0 </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_boolean </dd></dl>
</div>
</div>
<a class="anchor" id="a594a093bafb9091f843da3197e0638aa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_double </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>d</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_double</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#ada262c62364e3819b6a64b1e3a632336">json_object_double_to_json_string()</a> for how to set a custom format string.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">d</td><td>the double </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_double </dd></dl>
</div>
</div>
<a class="anchor" id="ae49671c026fe1ada370a75321e4e65f6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_double_s </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>d</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>ds</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new json_object of type json_type_double, using the exact serialized representation of the value.</p>
<p>This allows for numbers that would otherwise get displayed inefficiently (e.g. 12.3 => "12.300000000000001") to be serialized with the more convenient form.</p>
<p>Notes:</p>
<p>This is used by <a class="el" href="json__tokener_8h.html#a61679f178111963a9ffa3c8179553f7a">json_tokener_parse_ex()</a> to allow for an exact re-serialization of a parsed object.</p>
<p>The userdata field is used to store the string representation, so it can't be used for other data if this function is used.</p>
<p>A roughly equivalent sequence of calls, with the difference being that the serialization function won't be reset by <a class="el" href="json__object_8h.html#a3a7b7ce585565558cb69dad8d45d7757">json_object_set_double()</a>, is: </p>
<div class="fragment"><div class="line">jso = <a class="code" href="json__object_8h.html#a594a093bafb9091f843da3197e0638aa">json_object_new_double</a>(d);</div>
<div class="line"><a class="code" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer</a>(jso, <a class="code" href="json__object_8h.html#a56091ddbd2ec6d6200558cbeff1b86b8">json_object_userdata_to_json_string</a>,</div>
<div class="line"> strdup(ds), <a class="code" href="json__object_8h.html#aff3190c34884bea3b4e65e286b973d89">json_object_free_userdata</a>);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">d</td><td>the numeric value of the double. </td></tr>
<tr><td class="paramname">ds</td><td>the string representation of the double. This will be copied. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ae92f0770fb4b3c884ce35de52d3d7de8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_int </td>
<td>(</td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>i</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_int Note that values are stored as 64-bit values internally. To ensure the full range is maintained, use json_object_new_int64 instead. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">i</td><td>the integer </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_int </dd></dl>
</div>
</div>
<a class="anchor" id="a7847f74494645c2b076505c37cc4cb93"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_int64 </td>
<td>(</td>
<td class="paramtype">int64_t </td>
<td class="paramname"><em>i</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_int </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">i</td><td>the integer </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_int </dd></dl>
</div>
</div>
<a class="anchor" id="a29e23b5be729c679960242b3b81bcde0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_null </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method exists only to provide a complementary function along the lines of the other json_object_new_* functions. It always returns NULL, and it is entirely acceptable to simply use NULL directly. </p>
</div>
</div>
<a class="anchor" id="a68c383f54544fca19b5f2425be397600"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_object </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty object with a reference count of 1. The caller of this object initially has sole ownership. Remember, when using json_object_object_add or json_object_array_put_idx, ownership will transfer to the object/array. Call json_object_get if you want to maintain shared ownership or also add this object as a child of multiple objects or arrays. Any ownerships you acquired but did not transfer must be released through json_object_put.</p>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_object </dd></dl>
</div>
</div>
<a class="anchor" id="a7b7b5302b3903c9347eeb1f4a64d657b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_string </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>s</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_string</p>
<p>A copy of the string is made and the memory is managed by the json_object</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">s</td><td>the string </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_string </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#a778a1aa34a508d08daac3bdb83e24b52">json_object_new_string_len()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a778a1aa34a508d08daac3bdb83e24b52"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_string_len </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>s</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_string and allocate len characters for the new string.</p>
<p>A copy of the string is made and the memory is managed by the json_object</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">s</td><td>the string </td></tr>
<tr><td class="paramname">len</td><td>max length of the new string </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_string </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#a7b7b5302b3903c9347eeb1f4a64d657b">json_object_new_string()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="aa602ee5f6182b35f3f75a927320b4efd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_new_uint64 </td>
<td>(</td>
<td class="paramtype">uint64_t </td>
<td class="paramname"><em>i</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new empty json_object of type json_type_uint </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">i</td><td>the integer </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a json_object of type json_type_uint </dd></dl>
</div>
</div>
<a class="anchor" id="a27bd808a022251059a43f1f6370441cd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_object_add </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>val</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add an object field to a json_object of type json_type_object</p>
<p>The reference count of <code>val</code> will <em>not</em> be incremented, in effect transferring ownership that object to <code>obj</code>, and thus <code>val</code> will be freed when <code>obj</code> is. (i.e. through <code>json_object_put(obj)</code>)</p>
<p>If you want to retain a reference to the added object, independent of the lifetime of obj, you must increment the refcount with <code>json_object_get(val)</code> (and later release it with <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a>).</p>
<p>Since ownership transfers to <code>obj</code>, you must make sure that you do in fact have ownership over <code>val</code>. For instance, <a class="el" href="json__object_8h.html#a68c383f54544fca19b5f2425be397600">json_object_new_object()</a> will give you ownership until you transfer it, whereas <a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a> does not.</p>
<p>Any previous object stored under <code>key</code> in <code>obj</code> will have its refcount decremented, and be freed normally if that drops to zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">key</td><td>the object field name (a private copy will be duplicated) </td></tr>
<tr><td class="paramname">val</td><td>a json_object or NULL member to associate with the given field</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>On success, <code>0</code> is returned. On error, a negative value is returned. </dd></dl>
</div>
</div>
<a class="anchor" id="a57d3e444dd7db6b4510d21bf3716a002"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_object_add_ex </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *const </td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *const </td>
<td class="paramname"><em>val</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const unsigned </td>
<td class="paramname"><em>opts</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add an object field to a json_object of type json_type_object</p>
<p>The semantics are identical to json_object_object_add, except that an additional flag fields gives you more control over some detail aspects of processing. See the description of JSON_C_OBJECT_ADD_* flags for more details.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">key</td><td>the object field name (a private copy will be duplicated) </td></tr>
<tr><td class="paramname">val</td><td>a json_object or NULL member to associate with the given field </td></tr>
<tr><td class="paramname">opts</td><td>process-modifying options. To specify multiple options, use (OPT1|OPT2) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac6605fdafca20bd5d33c84f4f80a3bda"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void json_object_object_del </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>key</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete the given json_object field</p>
<p>The reference count will be decremented for the deleted object. If there are no more owners of the value represented by this key, then the value is freed. Otherwise, the reference to the value will remain in memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">key</td><td>the object field name </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a1a097805abb53b4c8a60d573730a8939"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_object_get </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>key</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the json_object associate with a given object field. Deprecated/discouraged: used json_object_object_get_ex instead.</p>
<p>This returns NULL if the field is found but its value is null, or if the field is not found, or if obj is not a json_type_object. If you need to distinguish between these cases, use <a class="el" href="json__object_8h.html#a90d5f16d58636f01d2ed1a6030c7366a">json_object_object_get_ex()</a>.</p>
<p><em>No</em> reference counts will be changed. There is no need to manually adjust reference counts through the json_object_put/json_object_get methods unless you need to have the child (value) reference maintain a different lifetime than the owning parent (obj). Ownership of the returned value is retained by obj (do not do json_object_put unless you have done a json_object_get). If you delete the value from obj (json_object_object_del) and wish to access the returned reference afterwards, make sure you have first gotten shared ownership through json_object_get (& don't forget to do a json_object_put or transfer ownership to prevent a memory leak).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">key</td><td>the object field name </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the json_object associated with the given field name </dd></dl>
</div>
</div>
<a class="anchor" id="a90d5f16d58636f01d2ed1a6030c7366a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> json_object_object_get_ex </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> ** </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the json_object associated with a given object field.</p>
<p>This returns true if the key is found, false in all other cases (including if obj isn't a json_type_object).</p>
<p><em>No</em> reference counts will be changed. There is no need to manually adjust reference counts through the json_object_put/json_object_get methods unless you need to have the child (value) reference maintain a different lifetime than the owning parent (obj). Ownership of value is retained by obj.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">key</td><td>the object field name </td></tr>
<tr><td class="paramname">value</td><td>a pointer where to store a reference to the json_object associated with the given field name.</td></tr>
</table>
</dd>
</dl>
<p>It is safe to pass a NULL value. </p>
<dl class="section return"><dt>Returns</dt><dd>whether or not the key exists </dd></dl>
</div>
</div>
<a class="anchor" id="ad59a0ad2ec914a5eef90af53acae06d9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_object_length </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the size of an object in terms of the number of fields it has. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object whose length to return </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="afabf61f932cd64a4122ca8092452eed5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_put </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decrement the reference count of json_object and free if it reaches zero.</p>
<p>You must have ownership of obj prior to doing this or you will cause an imbalance in the reference count, leading to a classic use-after-free bug. In particular, you normally do not need to call <code><a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a></code> on the json_object returned by <code><a class="el" href="json__object_8h.html#a1a097805abb53b4c8a60d573730a8939">json_object_object_get()</a></code> or <code><a class="el" href="json__object_8h.html#a676711a76545d4ec65cc75f100f5fd19">json_object_array_get_idx()</a></code>.</p>
<p>Just like after calling <code>free()</code> on a block of memory, you must not use <code>obj</code> after calling <code><a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a></code> on it or any object that it is a member of (unless you know you've called <code>json_object_get(obj)</code> to explicitly increment the refcount).</p>
<p>NULL may be passed, which which case this is a no-op.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the object was freed. </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#a675aa3a9cced685dbfd1c1a770a0c3e4">json_object_get()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a23863c1503f3a8dd8a460a6405da0a65"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_set_boolean </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> </td>
<td class="paramname"><em>new_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the json_bool value of a json_object</p>
<p>The type of obj is checked to be a json_type_boolean and 0 is returned if it is not without any further actions. If type of obj is json_type_boolean the object value is changed to new_value</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">new_value</td><td>the value to be set </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if value is set correctly, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a3a7b7ce585565558cb69dad8d45d7757"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_set_double </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>new_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the double value of a json_object</p>
<p>The type of obj is checked to be a json_type_double and 0 is returned if it is not without any further actions. If type of obj is json_type_double the object value is changed to new_value</p>
<p>If the object was created with <a class="el" href="json__object_8h.html#ae49671c026fe1ada370a75321e4e65f6">json_object_new_double_s()</a>, the serialization function is reset to the default and the cached serialized value is cleared.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">new_value</td><td>the value to be set </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if value is set correctly, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a4ab3568f12e01fd2967e765a72456caa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_set_int </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>new_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the int value of a json_object</p>
<p>The type of obj is checked to be a json_type_int and 0 is returned if it is not without any further actions. If type of obj is json_type_int the object value is changed to new_value</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">new_value</td><td>the value to be set </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if value is set correctly, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a7d3948600dde732abed0e261264ef53a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_set_int64 </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t </td>
<td class="paramname"><em>new_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the int64_t value of a json_object</p>
<p>The type of obj is checked to be a json_type_int and 0 is returned if it is not without any further actions. If type of obj is json_type_int the object value is changed to new_value</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">new_value</td><td>the value to be set </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if value is set correctly, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a889345512a214b8f78f6a73561523c7c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void json_object_set_serializer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>jso</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="json__types_8h.html#af84078100a9025df418f31626ea866fa">json_object_to_json_string_fn</a> * </td>
<td class="paramname"><em>to_string_func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>userdata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="json__types_8h.html#aa647d7c567a06abe1a1a511f6d6860e4">json_object_delete_fn</a> * </td>
<td class="paramname"><em>user_delete</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a custom serialization function to be used when this particular object is converted to a string by json_object_to_json_string.</p>
<p>If custom userdata is already set on this object, any existing user_delete function is called before the new one is set.</p>
<p>If to_string_func is NULL the default behaviour is reset (but the userdata and user_delete fields are still set).</p>
<p>The userdata parameter is optional and may be passed as NULL. It can be used to provide additional data for to_string_func to use. This parameter may be NULL even if user_delete is non-NULL.</p>
<p>The user_delete parameter is optional and may be passed as NULL, even if the userdata parameter is non-NULL. It will be called just before the json_object is deleted, after it's reference count goes to zero (see <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a>). If this is not provided, it is up to the caller to free the userdata at an appropriate time. (i.e. after the json_object is deleted)</p>
<p>Note that the userdata is the same as set by <a class="el" href="json__object_8h.html#a4ee4281ccd123c62878e931a0a3bc43b">json_object_set_userdata()</a>, so care must be taken not to overwrite the value when both a custom serializer and <a class="el" href="json__object_8h.html#a4ee4281ccd123c62878e931a0a3bc43b">json_object_set_userdata()</a> are used.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>the object to customize </td></tr>
<tr><td class="paramname">to_string_func</td><td>the custom serialization function </td></tr>
<tr><td class="paramname">userdata</td><td>an optional opaque cookie </td></tr>
<tr><td class="paramname">user_delete</td><td>an optional function from freeing userdata </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac35013e51cdc0651512801c947df431c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_set_string </td>
<td>(</td>
<td class="paramtype"><a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>new_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the string value of a json_object with zero terminated strings equivalent to json_object_set_string_len (obj, new_value, strlen(new_value)) </p>
<dl class="section return"><dt>Returns</dt><dd>1 if value is set correctly, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="ae48707a0c8689e14aaa3a9b831db27fc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_set_string_len </td>
<td>(</td>
<td class="paramtype"><a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>new_value</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>Set the string value of a json_object str</p>
<p>The type of obj is checked to be a json_type_string and 0 is returned if it is not without any further actions. If type of obj is json_type_string the object value is changed to new_value</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">new_value</td><td>the value to be set; Since string length is given in len this need not be zero terminated </td></tr>
<tr><td class="paramname">len</td><td>the length of new_value </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if value is set correctly, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a9900aa9a425e6f14e295b298460b65d4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> int json_object_set_uint64 </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t </td>
<td class="paramname"><em>new_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the uint64_t value of a json_object</p>
<p>The type of obj is checked to be a json_type_uint and 0 is returned if it is not without any further actions. If type of obj is json_type_uint the object value is changed to new_value</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">new_value</td><td>the value to be set </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if value is set correctly, 0 otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a4ee4281ccd123c62878e931a0a3bc43b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void json_object_set_userdata </td>
<td>(</td>
<td class="paramtype"><a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>jso</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>userdata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="json__types_8h.html#aa647d7c567a06abe1a1a511f6d6860e4">json_object_delete_fn</a> * </td>
<td class="paramname"><em>user_delete</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set an opaque userdata value for an object</p>
<p>The userdata can be retrieved using <a class="el" href="json__object_8h.html#ae925f3ec0f61cba5ea3dd50e0315f194">json_object_get_userdata()</a>.</p>
<p>If custom userdata is already set on this object, any existing user_delete function is called before the new one is set.</p>
<p>The user_delete parameter is optional and may be passed as NULL, even if the userdata parameter is non-NULL. It will be called just before the json_object is deleted, after it's reference count goes to zero (see <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a>). If this is not provided, it is up to the caller to free the userdata at an appropriate time. (i.e. after the json_object is deleted)</p>
<p>Note: Objects created by parsing strings may have custom serializers set which expect the userdata to contain specific data (due to use of <a class="el" href="json__object_8h.html#ae49671c026fe1ada370a75321e4e65f6">json_object_new_double_s()</a>). In this case, json_object_set_serialiser() with NULL as to_string_func should be used instead to set the userdata and reset the serializer to its default value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>the object to set the userdata for </td></tr>
<tr><td class="paramname">userdata</td><td>an optional opaque cookie </td></tr>
<tr><td class="paramname">user_delete</td><td>an optional function from freeing userdata </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab7390c22baa1700d977c2af6b22d43a4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char* json_object_to_json_string </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Stringify object to json format. Equivalent to json_object_to_json_string_ext(obj, JSON_C_TO_STRING_SPACED) The pointer you get is an internal of your json object. You don't have to free it, later use of <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a> should be sufficient. If you can not ensure there's no concurrent access to *obj use strdup(). </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a string in JSON format </dd></dl>
</div>
</div>
<a class="anchor" id="a9db613127bd4ef7db42307e43a85fc1b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char* json_object_to_json_string_ext </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</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>Stringify object to json format </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#ab7390c22baa1700d977c2af6b22d43a4">json_object_to_json_string()</a> for details on how to free string. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">flags</td><td>formatting options, see JSON_C_TO_STRING_PRETTY and other constants </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a string in JSON format </dd></dl>
</div>
</div>
<a class="anchor" id="add3770a3ba3d01a8f9adedfcd6bd8dbb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char* json_object_to_json_string_length </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> * </td>
<td class="paramname"><em>obj</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 class="paramkey"></td>
<td></td>
<td class="paramtype">size_t * </td>
<td class="paramname"><em>length</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Stringify object to json format </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="json__object_8h.html#ab7390c22baa1700d977c2af6b22d43a4">json_object_to_json_string()</a> for details on how to free string. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>the json_object instance </td></tr>
<tr><td class="paramname">flags</td><td>formatting options, see JSON_C_TO_STRING_PRETTY and other constants </td></tr>
<tr><td class="paramname">length</td><td>a pointer where, if not NULL, the length (without null) is stored </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a string in JSON format and the length if not NULL </dd></dl>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a86ea08e75ddf054742bf806a3bc3f983"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__object_8h.html#af4562514916f62ea56adf752ada10b52">json_c_shallow_copy_fn</a> json_c_shallow_copy_default</td>
</tr>
</table>
</div><div class="memdoc">
<p>The default shallow copy implementation for use with <a class="el" href="json__object_8h.html#aaac16505f13bc56accfad82604d8bcdc">json_object_deep_copy()</a>. This simply calls the appropriate json_object_new_<type>() function and copies over the serializer function (_to_json_string internal field of the json_object structure) but not any _userdata or _user_delete values.</p>
<p>If you're writing a custom shallow_copy function, perhaps because you're using your own custom serializer, you can call this first to create the new object before customizing it with <a class="el" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>1 on success, -1 on errors, but never 2. </dd></dl>
</div>
</div>
<a class="anchor" id="aff3190c34884bea3b4e65e286b973d89"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#aa647d7c567a06abe1a1a511f6d6860e4">json_object_delete_fn</a> json_object_free_userdata</td>
</tr>
</table>
</div><div class="memdoc">
<p>Simply call free on the userdata pointer. Can be used with <a class="el" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>unused </td></tr>
<tr><td class="paramname">userdata</td><td>the pointer that is passed to free(). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a56091ddbd2ec6d6200558cbeff1b86b8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#af84078100a9025df418f31626ea866fa">json_object_to_json_string_fn</a> json_object_userdata_to_json_string</td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy the jso->_userdata string over to pb as-is. Can be used with <a class="el" href="json__object_8h.html#a889345512a214b8f78f6a73561523c7c">json_object_set_serializer()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">jso</td><td>The object whose _userdata is used. </td></tr>
<tr><td class="paramname">pb</td><td>The destination buffer. </td></tr>
<tr><td class="paramname">level</td><td>Ignored. </td></tr>
<tr><td class="paramname">flags</td><td>Ignored. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 26 2020 15:11:19 for json-c by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2
</small></address>
</body>
</html>
|