| 471 */ |
471 */ |
| 472 cx_attr_nonnull_arg(1, 2, 3) |
472 cx_attr_nonnull_arg(1, 2, 3) |
| 473 CX_EXPORT int cxJsonWrite(void* target, const CxJsonValue* value, |
473 CX_EXPORT int cxJsonWrite(void* target, const CxJsonValue* value, |
| 474 cx_write_func wfunc, const CxJsonWriter* settings); |
474 cx_write_func wfunc, const CxJsonWriter* settings); |
| 475 |
475 |
| |
476 |
| |
477 /** |
| |
478 * Produces a compact string representation of the specified JSON value. |
| |
479 * |
| |
480 * @param value the JSON value |
| |
481 * @param allocator the allocator for the string |
| |
482 * @return the produced string |
| |
483 * @see cxJsonWrite() |
| |
484 * @see cxJsonWriterCompact() |
| |
485 * @see cxJsonToPrettyString() |
| |
486 */ |
| |
487 cx_attr_nonnull_arg(1) |
| |
488 CX_EXPORT cxmutstr cxJsonToString(CxJsonValue *value, const CxAllocator *allocator); |
| |
489 |
| |
490 /** |
| |
491 * Produces a pretty string representation of the specified JSON value. |
| |
492 * |
| |
493 * @param value the JSON value |
| |
494 * @param allocator the allocator for the string |
| |
495 * @return the produced string |
| |
496 * @see cxJsonWrite() |
| |
497 * @see cxJsonWriterPretty() |
| |
498 * @see cxJsonToString() |
| |
499 */ |
| |
500 cx_attr_nonnull_arg(1) |
| |
501 CX_EXPORT cxmutstr cxJsonToPrettyString(CxJsonValue *value, const CxAllocator *allocator); |
| |
502 |
| 476 /** |
503 /** |
| 477 * Initializes the JSON interface. |
504 * Initializes the JSON interface. |
| 478 * |
505 * |
| 479 * @param json the JSON interface |
506 * @param json the JSON interface |
| 480 * @param allocator the allocator that shall be used for the produced values |
507 * @param allocator the allocator that shall be used for the produced values |