Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
n_pretty.h File Reference

Lexical pretty-printers for JSON, XML/HTML and JavaScript text. More...

#include "nilorea/n_str.h"
Include dependency graph for n_pretty.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

N_STR * n_pretty_js (const char *text)
 Conservatively re-indent JavaScript (newlines at top-level braces and semicolons, two-space indent by brace depth).
N_STR * n_pretty_json (const char *text)
 Reformat a JSON document with cJSON (parse + print).
N_STR * n_pretty_json_lenient (const char *text)
 Re-indent a JSON document by punctuation alone, without parsing it.
N_STR * n_pretty_xml (const char *text)
 Re-indent an XML or HTML document (one tag or text run per line).

Detailed Description

Lexical pretty-printers for JSON, XML/HTML and JavaScript text.

Author
Castagnier Mickael
Version
1.0
Date
10/07/2026

Definition in file n_pretty.h.