| 921 static const CxJsonWriter cx_json_writer_default = { |
921 static const CxJsonWriter cx_json_writer_default = { |
| 922 false, |
922 false, |
| 923 true, |
923 true, |
| 924 255, |
924 255, |
| 925 false, |
925 false, |
| 926 0, |
926 4, |
| 927 false, |
927 false, |
| 928 0 |
928 80 |
| 929 }; |
929 }; |
| 930 |
930 |
| 931 // TODO: add default for pretty printing and add functions to create default structs |
931 CxJsonWriter cxJsonWriterCompact(void) { |
| |
932 return cx_json_writer_default; |
| |
933 } |
| |
934 |
| |
935 CxJsonWriter cxJsonWriterPretty(bool use_spaces) { |
| |
936 return (CxJsonWriter) { |
| |
937 true, |
| |
938 true, |
| |
939 255, |
| |
940 use_spaces, |
| |
941 4, |
| |
942 false, |
| |
943 80 |
| |
944 }; |
| |
945 } |
| 932 |
946 |
| 933 |
947 |
| 934 int cx_json_write_rec( |
948 int cx_json_write_rec( |
| 935 void *target, |
949 void *target, |
| 936 const CxJsonValue *value, |
950 const CxJsonValue *value, |