Diff for /libelwix/example/test_json.c between versions 1.5.4.1 and 1.6.20.1

version 1.5.4.1, 2025/08/25 10:05:52 version 1.6.20.1, 2026/03/31 15:25:22
Line 80  run_simple(json_t *json) Line 80  run_simple(json_t *json)
   
         tok = json_findbykey(teststr, "groups", J_UNDEF, toks, ret);          tok = json_findbykey(teststr, "groups", J_UNDEF, toks, ret);
         if (tok) {          if (tok) {
                str = json_token2str(teststr, tok);                str = json_token2rstr(teststr, tok);
                 arr = json_token2vars(teststr, tok);                  arr = json_token2vars(teststr, tok);
                 printf("Key=\"groups\" data parent=%ld idx=%ld size=%ld type=%d %s\n", tok->tok_parent, tok->tok_idx, tok->tok_size, tok->tok_type, str);                  printf("Key=\"groups\" data parent=%ld idx=%ld size=%ld type=%d %s\n", tok->tok_parent, tok->tok_idx, tok->tok_size, tok->tok_type, str);
                 e_free(str);                  e_free(str);
Line 112  run_simple(json_t *json) Line 112  run_simple(json_t *json)
   
         tok = json_findbykey(teststr, "testend", J_UNDEF, toks, ret);          tok = json_findbykey(teststr, "testend", J_UNDEF, toks, ret);
         if (tok) {          if (tok) {
                str = json_token2str(teststr, tok);                str = json_token2rstr(teststr, tok);
                 arr = json_token2vars(teststr, tok);                  arr = json_token2vars(teststr, tok);
                 printf("Key=\"testend\" data parent=%ld idx=%ld size=%ld type=%d %s\n", tok->tok_parent, tok->tok_idx, tok->tok_size, tok->tok_type, str);                  printf("Key=\"testend\" data parent=%ld idx=%ld size=%ld type=%d %s\n", tok->tok_parent, tok->tok_idx, tok->tok_size, tok->tok_type, str);
                 e_free(str);                  e_free(str);
Line 301  run_stdin(json_t *json) Line 301  run_stdin(json_t *json)
   
         tok = json_findbykey(szJSON, "aaa", J_STRING, toks, ret);          tok = json_findbykey(szJSON, "aaa", J_STRING, toks, ret);
         if (tok) {          if (tok) {
                str = json_token2str(szJSON, tok);                str = json_token2rstr(szJSON, tok);
                 if (str) {                  if (str) {
                         printf("str=%s\n", str);                          printf("str=%s\n", str);
                         json_freestr(str);                          json_freestr(str);

Removed from v.1.5.4.1  
changed lines
  Added in v.1.6.20.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>