| 368 cxJsonObjPutLiteral(obj, cx_str("visited"), visited ? CX_JSON_TRUE : CX_JSON_FALSE); |
368 cxJsonObjPutLiteral(obj, cx_str("visited"), visited ? CX_JSON_TRUE : CX_JSON_FALSE); |
| 369 } |
369 } |
| 370 |
370 |
| 371 CxJsonWriter writer = cxJsonWriterCompact(); |
371 CxJsonWriter writer = cxJsonWriterCompact(); |
| 372 CxBuffer buf; |
372 CxBuffer buf; |
| 373 cxBufferInit(&buf, NULL, 128, NULL, CX_BUFFER_AUTO_EXTEND); |
373 cxBufferInit(&buf, NULL, NULL, 128, bCX_BUFFER_AUTO_EXTEND); |
| 374 cxJsonWrite(&buf, obj, (cx_write_func)cxBufferWrite, &writer); |
374 cxJsonWrite(&buf, obj, (cx_write_func)cxBufferWrite, &writer); |
| 375 cxJsonValueFree(obj); |
375 cxJsonValueFree(obj); |
| 376 cxBufferTerminate(&buf); |
376 cxBufferTerminate(&buf); |
| 377 |
377 |
| 378 return buf.space; |
378 return buf.space; |