Branch Coverage

json-create-perl.c
Criterion Covered Total %
branch 442 1740 25.4


line true false branch
204 2 13 if (jc->fatal_errors) {
226 0 96 if (jc->length == 0) {
227 0 0 if (jc->output == 0) {
234 96 0 if (! jc->output) {
255 0 2463 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
292 0 158 if (slen < MARGIN || slen < BUFSIZE - jc->length) {
0 0 if (slen < MARGIN || slen < BUFSIZE - jc->length) {
293 625 158 for (i = 0; i < slen; i++) {
297 0 158 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
302 0 0 for (i = 0; i < slen; i++) {
303 0 0 CALL (add_char (jc, (unsigned char) s[i]));
0 0 CALL (add_char (jc, (unsigned char) s[i]));
0 0 CALL (add_char (jc, (unsigned char) s[i]));
314 0 117 CALL (add_char (jc, '\n'));
0 0 CALL (add_char (jc, '\n'));
0 0 CALL (add_char (jc, '\n'));
315 188 117 for (d = 0; d < jc->depth; d++) {
316 0 188 CALL (add_char (jc, '\t')); \
0 0 CALL (add_char (jc, '\t')); \
0 0 CALL (add_char (jc, '\t')); \
326 0 0 for (i = 0; i < slen; i++) {
329 0 0 if (c == '\n') {
330 0 0 if (i < slen - 1) {
331 0 0 CALL (newline_indent (jc));
0 0 CALL (newline_indent (jc));
0 0 CALL (newline_indent (jc));
336 0 0 CALL (add_char (jc, c));
0 0 CALL (add_char (jc, c));
0 0 CALL (add_char (jc, c));
359 6 36 if (jc->unicode_upper) {
374 0 42 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
383 9 12 if (u > 0xffff) {
387 0 9 if (status != UNICODE_OK) {
388 0 0 if (JCEH) {
395 0 9 CALL (add_one_u (jc, hi));
0 0 CALL (add_one_u (jc, hi));
0 0 CALL (add_one_u (jc, hi));
531 0 62 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
532 109 59 for (i = 0; i < keylen; ) {
538 0 2 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 2 ASCII;
0 0 ASCII;
0 0 ASCII;
0 1 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 1 ASCII;
0 0 ASCII;
0 0 ASCII;
0 100 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
547 0 59 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
560 0 270 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
561 856 269 for (i = 0; i < keylen; ) {
567 0 2 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 2 ASCII;
0 0 ASCII;
0 0 ASCII;
0 1 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 1 ASCII;
0 0 ASCII;
0 0 ASCII;
0 701 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
4 8 ASCII;
0 4 ASCII;
0 0 ASCII;
0 0 ASCII;
0 8 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
0 0 ASCII;
570 2 1 BADUTF8;
0 2 BADUTF8;
0 0 BADUTF8;
0 0 BADUTF8;
576 5 0 if (d < 0x80 || d > 0xBF) {
0 5 if (d < 0x80 || d > 0xBF) {
577 0 0 BADUTF8;
0 0 BADUTF8;
0 0 BADUTF8;
0 0 BADUTF8;
581 4 1 if (jc->unicode_escape_all) {
585 0 4 CALL (add_u (jc, u));
0 0 CALL (add_u (jc, u));
0 0 CALL (add_u (jc, u));
588 0 1 CALL (add_str_len (jc, (const char *) key + i, 2));
0 0 CALL (add_str_len (jc, (const char *) key + i, 2));
0 0 CALL (add_str_len (jc, (const char *) key + i, 2));
597 66 0 if (d < 0x80 || d > 0xBF ||
66 0 if (d < 0x80 || d > 0xBF ||
66 0 if (d < 0x80 || d > 0xBF ||
598 0 66 e < 0x80 || e > 0xBF) {
599 0 0 BADUTF8;
0 0 BADUTF8;
0 0 BADUTF8;
0 0 BADUTF8;
603 64 2 if (! jc->no_javascript_safe &&
10 54 if (! jc->no_javascript_safe &&
604 8 2 c == 0xe2 && d == 0x80 &&
4 4 c == 0xe2 && d == 0x80 &&
605 4 0 (e == 0xa8 || e == 0xa9)) {
606 0 8 CALL (add_one_u (jc, 0x2028 + e - 0xa8));
0 0 CALL (add_one_u (jc, 0x2028 + e - 0xa8));
0 0 CALL (add_one_u (jc, 0x2028 + e - 0xa8));
609 8 50 if (jc->unicode_escape_all) {
614 0 8 CALL (add_u (jc, u));
0 0 CALL (add_u (jc, u));
0 0 CALL (add_u (jc, u));
617 0 50 CALL (add_str_len (jc, (const char *) key + i, 3));
0 0 CALL (add_str_len (jc, (const char *) key + i, 3));
0 0 CALL (add_str_len (jc, (const char *) key + i, 3));
628 63 0 if (
633 63 0 (c < 0xf4 &&
634 63 0 (d < 0x80 || d > 0xBF ||
63 0 (d < 0x80 || d > 0xBF ||
635 63 0 e < 0x80 || e > 0xBF ||
63 0 e < 0x80 || e > 0xBF ||
636 63 0 f < 0x80 || f > 0xBF))
637 0 63 ||
639 0 0 (c == 0xf4 &&
640 0 0 (d < 0x80 || d > 0x8F ||
0 0 (d < 0x80 || d > 0x8F ||
641 0 0 e < 0x80 || e > 0xBF ||
0 0 e < 0x80 || e > 0xBF ||
642 0 0 f < 0x80 || f > 0xBF))
644 0 0 BADUTF8;
0 0 BADUTF8;
0 0 BADUTF8;
0 0 BADUTF8;
648 9 54 if (jc->unicode_escape_all) {
659 0 54 CALL (add_str_len (jc, (const char *) key + i, 4));
0 0 CALL (add_str_len (jc, (const char *) key + i, 4));
0 0 CALL (add_str_len (jc, (const char *) key + i, 4));
666 0 269 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
0 0 CALL (add_char (jc, '"'));
676 122 0 istring = SvPV (input, ilength);
677 54 68 if (SvUTF8 (input)) {
684 17 51 else if (jc->strict) {
707 106 0 iv = SvIV (sv);
717 10 96 if (iv < 0) {
722 42 64 if (iv < 10) {
727 9 55 else if (iv < 100) {
734 7 48 else if (iv < 1000) {
744 8 40 else if (iv < 10000) {
755 6 34 else if (iv < 100000) {
767 6 28 else if (iv < 1000000) {
781 12 16 else if (iv < 10000000) {
797 6 10 else if (iv < 100000000) {
815 8 2 else if (iv < 1000000000) {
839 0 2 if (ivlen >= MARGIN) {
840 0 0 if (JCEH) {
841 0 0 (*JCEH) (__FILE__, __LINE__,
850 0 106 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
870 0 2 PUSHMARK (SP);
871 0 2 XPUSHs (sv_2mortal (newSVsv (json)));
875 2 0 FREETMPS;
878 0 2 if (! error) {
881 0 2 if (SvOK (error) && SvCUR (error) > 0) {
0 0 if (SvOK (error) && SvCUR (error) > 0) {
0 0 if (SvOK (error) && SvCUR (error) > 0) {
1 1 if (SvOK (error) && SvCUR (error) > 0) {
882 1 0 json_create_user_message (jc, json_create_invalid_user_json,
1 0 json_create_user_message (jc, json_create_invalid_user_json,
902 0 14 PUSHMARK (SP);
904 0 14 XPUSHs (sv_2mortal (newRV (r)));
909 14 0 FREETMPS;
912 3 11 if (! SvOK (json)) {
3 0 if (! SvOK (json)) {
3 0 if (! SvOK (json)) {
919 0 11 if (SvUTF8 (json)) {
924 11 0 jsonc = SvPV (json, jsonl);
925 2 9 if (jc->validate) {
926 1 1 CALL (json_create_validate_user_json (jc, json));
1 0 CALL (json_create_validate_user_json (jc, json));
0 0 CALL (json_create_validate_user_json (jc, json));
933 0 10 if (jc->indent) {
934 0 0 CALL (add_str_len_indent (jc, jsonc, jsonl));
0 0 CALL (add_str_len_indent (jc, jsonc, jsonl));
0 0 CALL (add_str_len_indent (jc, jsonc, jsonl));
938 0 10 CALL (add_str_len (jc, jsonc, jsonl));
0 0 CALL (add_str_len (jc, jsonc, jsonl));
0 0 CALL (add_str_len (jc, jsonc, jsonl));
951 102 0 fv = SvNV (sv);
952 93 9 if (isfinite (fv)) {
953 57 36 if (jc->fformat) {
960 0 93 if (fvlen >= MARGIN) {
964 0 93 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
0 0 CHECKLENGTH;
967 3 6 if (jc->non_finite_handler) {
968 0 3 CALL (json_create_call_to_json (jc, jc->non_finite_handler, sv));
0 0 CALL (json_create_call_to_json (jc, jc->non_finite_handler, sv));
0 0 CALL (json_create_call_to_json (jc, jc->non_finite_handler, sv));
971 3 3 if (jc->strict) {
976 1 2 if (isnan (fv)) {
977 0 1 ADD ("\"nan\"");
0 0 ADD ("\"nan\"");
0 0 ADD ("\"nan\"");
979 2 0 else if (isinf (fv)) {
980 1 1 if (fv < 0.0) {
981 0 1 ADD ("\"-inf\"");
0 0 ADD ("\"-inf\"");
0 0 ADD ("\"-inf\"");
984 0 1 ADD ("\"inf\"");
0 0 ADD ("\"inf\"");
0 0 ADD ("\"inf\"");
1067 0 111 CALL (add_char (jc, c));
0 0 CALL (add_char (jc, c));
0 0 CALL (add_char (jc, c));
1069 23 88 if (jc->indent) {
1070 23 0 DINC;
1071 0 23 CALL (newline_indent (jc)); \
0 0 CALL (newline_indent (jc)); \
0 0 CALL (newline_indent (jc)); \
1081 23 78 if (jc->indent) {
1082 23 0 DDEC;
1083 0 23 CALL (newline_indent (jc)); \
0 0 CALL (newline_indent (jc)); \
0 0 CALL (newline_indent (jc)); \
1086 0 101 CALL (add_char (jc, c));
0 0 CALL (add_char (jc, c));
0 0 CALL (add_char (jc, c));
1088 23 78 if (jc->indent) {
1091 6 17 if (jc->depth == 0) {
1092 0 6 CALL (add_char (jc, '\n'));
0 0 CALL (add_char (jc, '\n'));
0 0 CALL (add_char (jc, '\n'));
1117 0 10 PUSHMARK(SP);
1118 0 10 EXTEND(SP, 2);
1119 0 10 XPUSHs(sv_2mortal (newSVsv (sa)));
1120 0 10 XPUSHs(sv_2mortal (newSVsv (sb)));
1123 0 10 if (n != 1) {
1128 10 0 c = POPi;
1130 10 0 FREETMPS;
1143 0 17 if (n_keys == 0) {
1144 0 0 CALL (add_str_len (jc, "{}", strlen ("{}")));
0 0 CALL (add_str_len (jc, "{}", strlen ("{}")));
0 0 CALL (add_str_len (jc, "{}", strlen ("{}")));
1147 0 17 CALL (add_open (jc, '{'));
0 0 CALL (add_open (jc, '{'));
0 0 CALL (add_open (jc, '{'));
1148 0 17 Newxz (keys, n_keys, SV *);
1150 70 17 for (i = 0; i < n_keys; i++) {
1154 0 70 if (HeUTF8 (he)) {
33 37 if (HeUTF8 (he)) {
1159 2 15 if (jc->cmp) {
1167 70 17 for (i = 0; i < n_keys; i++) {
1173 53 17 COMMA;
0 53 COMMA;
0 0 COMMA;
0 0 COMMA;
53 0 COMMA;
0 53 COMMA;
0 0 COMMA;
0 0 COMMA;
1175 70 0 key = SvPV (key_sv, keylen);
1176 0 70 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
0 0 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
0 0 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
1179 0 70 if (! he) {
1183 0 70 CALL (add_char (jc, ':'));
0 0 CALL (add_char (jc, ':'));
0 0 CALL (add_char (jc, ':'));
1184 0 70 CALL (json_create_recursively (jc, HeVAL(he)));
0 0 CALL (json_create_recursively (jc, HeVAL(he)));
0 0 CALL (json_create_recursively (jc, HeVAL(he)));
1189 0 17 CALL (add_close (jc, '}'));
0 0 CALL (add_close (jc, '}'));
0 0 CALL (add_close (jc, '}'));
1207 17 62 if (jc->sort) {
1212 1 61 if (n_keys == 0) {
1213 0 1 CALL (add_str_len (jc, "{}", strlen ("{}")));
0 0 CALL (add_str_len (jc, "{}", strlen ("{}")));
0 0 CALL (add_str_len (jc, "{}", strlen ("{}")));
1216 0 61 CALL (add_open (jc, '{'));
0 0 CALL (add_open (jc, '{'));
0 0 CALL (add_open (jc, '{'));
1217 140 52 for (i = 0; i < n_keys; i++) {
1229 79 61 COMMA;
0 79 COMMA;
0 0 COMMA;
0 0 COMMA;
2 77 COMMA;
0 2 COMMA;
0 0 COMMA;
0 0 COMMA;
1230 0 140 if (HeUTF8 (he)) {
4 136 if (HeUTF8 (he)) {
1232 0 4 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
0 0 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
0 0 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
1235 45 91 else if (jc->strict) {
1236 2 43 CALL (json_create_add_ascii_key_len (jc, (unsigned char *) key,
2 0 CALL (json_create_add_ascii_key_len (jc, (unsigned char *) key,
0 0 CALL (json_create_add_ascii_key_len (jc, (unsigned char *) key,
1240 0 91 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
0 0 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
0 0 CALL (json_create_add_key_len (jc, (const unsigned char *) key,
1243 0 138 CALL (add_char (jc, ':'));
0 0 CALL (add_char (jc, ':'));
0 0 CALL (add_char (jc, ':'));
1245 7 131 CALL (json_create_recursively (jc, value));
7 0 CALL (json_create_recursively (jc, value));
0 0 CALL (json_create_recursively (jc, value));
1247 0 52 CALL (add_close (jc, '}'));
0 0 CALL (add_close (jc, '}'));
0 0 CALL (add_close (jc, '}'));
1263 0 33 CALL (add_open (jc, '['));
0 0 CALL (add_open (jc, '['));
0 0 CALL (add_open (jc, '['));
1270 163 32 for (i = 0; i < n_keys; i++) {
1272 130 33 COMMA;
0 130 COMMA;
0 0 COMMA;
0 0 COMMA;
16 114 COMMA;
0 16 COMMA;
0 0 COMMA;
0 0 COMMA;
1275 163 0 if (avv) {
1282 1 162 CALL (json_create_recursively (jc, value));
1 0 CALL (json_create_recursively (jc, value));
0 0 CALL (json_create_recursively (jc, value));
1285 0 32 CALL (add_close (jc, ']'));
0 0 CALL (add_close (jc, ']'));
0 0 CALL (add_close (jc, ']'));
1293 2 3 if (jc->type_handler) {
1294 1 1 CALL (json_create_call_to_json (jc, jc->type_handler, r));
1 0 CALL (json_create_call_to_json (jc, jc->type_handler, r));
0 0 CALL (json_create_call_to_json (jc, jc->type_handler, r));
1316 1 32 CALL (json_create_add_array (jc, (AV *) r));
1 0 CALL (json_create_add_array (jc, (AV *) r));
0 0 CALL (json_create_add_array (jc, (AV *) r));
1321 9 70 CALL (json_create_add_object (jc, (HV *) r));
9 0 CALL (json_create_add_object (jc, (HV *) r));
0 0 CALL (json_create_add_object (jc, (HV *) r));
1327 0 0 STRICT_NO_SCALAR;
1328 0 0 CALL (json_create_add_float (jc, r));
0 0 CALL (json_create_add_float (jc, r));
0 0 CALL (json_create_add_float (jc, r));
1334 1 1 STRICT_NO_SCALAR;
1335 0 1 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
1340 1 1 STRICT_NO_SCALAR;
1341 0 1 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
1346 0 2 STRICT_NO_SCALAR;
1349 0 2 if (SvIOK (r)) {
1350 0 0 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
1352 0 2 else if (SvNOK (r)) {
1353 0 0 CALL (json_create_add_float (jc, r));
0 0 CALL (json_create_add_float (jc, r));
0 0 CALL (json_create_add_float (jc, r));
1356 0 2 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
1362 4 1 CALL (json_create_handle_unknown_type (jc, r));
4 0 CALL (json_create_handle_unknown_type (jc, r));
0 0 CALL (json_create_handle_unknown_type (jc, r));
1387 17 0 if (sv_ptr) {
1390 9 8 pv = SvPV (*sv_ptr, pvlen);
1394 9 8 if (pvlen == strlen ("bool") &&
9 0 if (pvlen == strlen ("bool") &&
1396 9 0 if (SvTRUE (r)) {
0 9 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
1 8 if (SvTRUE (r)) {
1 0 if (SvTRUE (r)) {
0 1 if (SvTRUE (r)) {
1 7 if (SvTRUE (r)) {
1 0 if (SvTRUE (r)) {
0 1 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
1 0 if (SvTRUE (r)) {
7 0 if (SvTRUE (r)) {
7 0 if (SvTRUE (r)) {
2 5 if (SvTRUE (r)) {
0 2 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
5 2 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
1397 0 6 ADD ("true");
0 0 ADD ("true");
0 0 ADD ("true");
1400 0 3 ADD ("false");
0 0 ADD ("false");
0 0 ADD ("false");
1403 8 0 else if (SvROK (*sv_ptr)) {
1406 8 0 switch (SvTYPE (what)) {
1408 2 6 CALL (json_create_call_to_json (jc, what, r));
2 0 CALL (json_create_call_to_json (jc, what, r));
0 0 CALL (json_create_call_to_json (jc, what, r));
1419 0 0 if (JCEH) {
1447 0 0 if (jc->strict) {
1450 0 0 CALL (json_create_handle_ref (jc, r));
0 0 CALL (json_create_handle_ref (jc, r));
0 0 CALL (json_create_handle_ref (jc, r));
1465 27 117 if (sv_isobject (input)) {
1470 7 20 if (olen == strlen (JCBOOL) &&
4 3 if (olen == strlen (JCBOOL) &&
1472 4 0 if (SvTRUE (r)) {
0 4 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 4 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 4 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
4 0 if (SvTRUE (r)) {
4 0 if (SvTRUE (r)) {
2 2 if (SvTRUE (r)) {
0 2 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
2 2 if (SvTRUE (r)) {
0 0 if (SvTRUE (r)) {
1473 0 2 ADD("true");
0 0 ADD("true");
0 0 ADD("true");
1476 0 2 ADD("false");
0 0 ADD("false");
0 0 ADD("false");
1480 1 22 if (jc->obj_handler) {
1481 1 0 CALL (json_create_call_to_json (jc, jc->obj_handler, r));
1 0 CALL (json_create_call_to_json (jc, jc->obj_handler, r));
0 0 CALL (json_create_call_to_json (jc, jc->obj_handler, r));
1484 17 5 if (jc->handlers) {
1485 2 15 CALL (json_create_handle_object (jc, r, objtype, olen));
2 0 CALL (json_create_handle_object (jc, r, objtype, olen));
0 0 CALL (json_create_handle_object (jc, r, objtype, olen));
1488 1 4 if (jc->strict) {
1496 14 107 CALL (json_create_handle_ref (jc, r));
14 0 CALL (json_create_handle_ref (jc, r));
0 0 CALL (json_create_handle_ref (jc, r));
1521 0 0 ADD ("null");
0 0 ADD ("null");
0 0 ADD ("null");
1527 0 117 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
1532 0 101 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
1537 3 92 CALL (json_create_add_float (jc, r));
3 0 CALL (json_create_add_float (jc, r));
0 0 CALL (json_create_add_float (jc, r));
1541 10 0 if (SvNIOK (r)) {
1542 7 3 if (SvNOK (r)) {
1550 0 7 CALL (json_create_add_float (jc, r));
0 0 CALL (json_create_add_float (jc, r));
0 0 CALL (json_create_add_float (jc, r));
1552 3 0 else if (SvIOK (r)) {
1560 0 3 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
1565 0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
1570 0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
1577 1 0 if (SvIOK (r)) {
1579 0 1 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
0 0 CALL (json_create_add_integer (jc, r));
1592 0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
0 0 CALL (json_create_add_string (jc, r));
1597 0 0 CALL (json_create_handle_unknown_type (jc, r));
0 0 CALL (json_create_handle_unknown_type (jc, r));
0 0 CALL (json_create_handle_unknown_type (jc, r));
1599 77 244 TOP_NEWLINE;
0 77 TOP_NEWLINE;
0 0 TOP_NEWLINE;
0 0 TOP_NEWLINE;
0 0 TOP_NEWLINE;
1613 8 474 if (! SvOK (input)) {
8 0 if (! SvOK (input)) {
8 0 if (! SvOK (input)) {
1617 0 8 ADD ("null");
0 0 ADD ("null");
0 0 ADD ("null");
1618 1 7 TOP_NEWLINE;
1 0 TOP_NEWLINE;
0 1 TOP_NEWLINE;
0 0 TOP_NEWLINE;
0 0 TOP_NEWLINE;
1623 2 472 if (input == &PL_sv_yes) {
1625 0 2 ADD ("true");
0 0 ADD ("true");
0 0 ADD ("true");
1628 2 470 if (input == &PL_sv_no) {
1630 0 2 ADD ("false");
0 0 ADD ("false");
0 0 ADD ("false");
1633 144 326 if (SvROK (input)) {
1634 18 126 CALL (json_create_refobj (jc, input));
18 0 CALL (json_create_refobj (jc, input));
0 0 CALL (json_create_refobj (jc, input));
1637 3 321 CALL (json_create_not_ref (jc, input));
3 0 CALL (json_create_not_ref (jc, input));
0 0 CALL (json_create_not_ref (jc, input));
1679 13 96 FINALCALL (json_create_recursively (jc, input));
13 0 FINALCALL (json_create_recursively (jc, input));
0 0 FINALCALL (json_create_recursively (jc, input));
0 13 FINALCALL (json_create_recursively (jc, input));
1680 0 96 FINALCALL (json_create_buffer_fill (jc));
0 0 FINALCALL (json_create_buffer_fill (jc));
0 0 FINALCALL (json_create_buffer_fill (jc));
0 0 FINALCALL (json_create_buffer_fill (jc));
1682 24 72 if (jc->unicode && ! jc->downgrade_utf8) {
23 1 if (jc->unicode && ! jc->downgrade_utf8) {
1683 0 23 if (jc->utf8_dangerous) {
1684 0 0 if (is_utf8_string ((U8 *) SvPV_nolen (jc->output),
0 0 if (is_utf8_string ((U8 *) SvPV_nolen (jc->output),
1729 2 26 if (jc->fformat) {
1744 0 4 CALL (json_create_free_fformat (jc));
0 0 CALL (json_create_free_fformat (jc));
0 0 CALL (json_create_free_fformat (jc));
1745 4 0 if (! SvTRUE (fformat)) {
0 4 if (! SvTRUE (fformat)) {
0 0 if (! SvTRUE (fformat)) {
0 4 if (! SvTRUE (fformat)) {
0 0 if (! SvTRUE (fformat)) {
0 0 if (! SvTRUE (fformat)) {
2 2 if (! SvTRUE (fformat)) {
2 0 if (! SvTRUE (fformat)) {
0 2 if (! SvTRUE (fformat)) {
0 0 if (! SvTRUE (fformat)) {
0 0 if (! SvTRUE (fformat)) {
0 2 if (! SvTRUE (fformat)) {
2 0 if (! SvTRUE (fformat)) {
2 0 if (! SvTRUE (fformat)) {
2 0 if (! SvTRUE (fformat)) {
0 2 if (! SvTRUE (fformat)) {
0 0 if (! SvTRUE (fformat)) {
2 0 if (! SvTRUE (fformat)) {
0 0 if (! SvTRUE (fformat)) {
1750 2 0 ff = SvPV (fformat, fflen);
1751 0 2 if (! strchr (ff, '%')) {
1756 8 2 for (i = 0; i < fflen; i++) {
1767 5 19 if (jc->handlers) {
1778 2 24 if (jc->type_handler) {
1789 1 24 if (jc->obj_handler) {
1800 1 24 if (jc->non_finite_handler) {
1811 1 24 if (jc->cmp) {
1822 0 24 CALL (json_create_free_fformat (jc));
0 0 CALL (json_create_free_fformat (jc));
0 0 CALL (json_create_free_fformat (jc));
1823 0 24 CALL (json_create_remove_handlers (jc));
0 0 CALL (json_create_remove_handlers (jc));
0 0 CALL (json_create_remove_handlers (jc));
1824 0 24 CALL (json_create_remove_type_handler (jc));
0 0 CALL (json_create_remove_type_handler (jc));
0 0 CALL (json_create_remove_type_handler (jc));
1825 0 24 CALL (json_create_remove_obj_handler (jc));
0 0 CALL (json_create_remove_obj_handler (jc));
0 0 CALL (json_create_remove_obj_handler (jc));
1826 0 24 CALL (json_create_remove_non_finite_handler (jc));
0 0 CALL (json_create_remove_non_finite_handler (jc));
0 0 CALL (json_create_remove_non_finite_handler (jc));
1827 0 24 CALL (json_create_remove_cmp (jc));
0 0 CALL (json_create_remove_cmp (jc));
0 0 CALL (json_create_remove_cmp (jc));
1832 0 24 if (jc->n_mallocs != 0) {
1892 6 0 key = SvPV (key_sv, key_len);
1894 0 6 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
0 0 BOOL (downgrade_utf8);
1895 0 6 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
0 0 BOOL (escape_slash);
1896 0 6 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
0 0 BOOL (fatal_errors);
1897 4 2 BOOL (indent);
4 0 BOOL (indent);
4 0 BOOL (indent);
0 4 BOOL (indent);
0 0 BOOL (indent);
0 4 BOOL (indent);
0 0 BOOL (indent);
0 0 BOOL (indent);
0 4 BOOL (indent);
0 0 BOOL (indent);
0 0 BOOL (indent);
0 0 BOOL (indent);
0 0 BOOL (indent);
0 0 BOOL (indent);
4 0 BOOL (indent);
4 0 BOOL (indent);
0 4 BOOL (indent);
0 0 BOOL (indent);
0 0 BOOL (indent);
4 0 BOOL (indent);
0 0 BOOL (indent);
1898 0 2 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
0 0 BOOL (no_javascript_safe);
1899 0 2 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
0 0 BOOL (replace_bad_utf8);
1900 2 0 BOOL (sort);
2 0 BOOL (sort);
2 0 BOOL (sort);
0 2 BOOL (sort);
0 0 BOOL (sort);
0 2 BOOL (sort);
0 0 BOOL (sort);
0 0 BOOL (sort);
0 2 BOOL (sort);
0 0 BOOL (sort);
0 0 BOOL (sort);
0 0 BOOL (sort);
0 0 BOOL (sort);
0 0 BOOL (sort);
2 0 BOOL (sort);
2 0 BOOL (sort);
0 2 BOOL (sort);
0 0 BOOL (sort);
0 0 BOOL (sort);
2 0 BOOL (sort);
0 0 BOOL (sort);
1901 0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
0 0 BOOL (strict);
1902 0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
0 0 BOOL (unicode_upper);
1903 0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
0 0 BOOL (unicode_escape_all);
1904 0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
0 0 BOOL (validate);
1905 0 0 HANDLER (non_finite);
0 0 HANDLER (non_finite);
1906 0 0 HANDLER (object);
0 0 HANDLER (object);
1907 0 0 HANDLER (type);
0 0 HANDLER (type);