About this mod
Rxi's JSON module for CET with PRETTY formatting.
- Requirements
- Permissions and credits
This is a modified version of rxi's JSON module, which is included with CET. This one supports pretty formatting.
Changes are documented in the json.lua code.
Credits: rxi
Syntax:
json.encode( data , [tab_size] )
By default, tab
string.char(9)
is used.For line breaks
string.char(10)
is used.tab_size, number 1 to n, is optional. It defines the number of spaces per level, instead of tabs.
Example
u = {
x = 1,
y = 6,
z = 3
}
a = {
b = "test",
c = 1,
d = {
e = true,
f = "hello",
g = {u, u, u},
h = {"a", "b"}
}
}
enc = json.encode(a)
Output
{
"b": "test",
"d": {
"f": "hello",
"e": true,
"h": ["a","b"],
"g": [{
"z": 3,
"y": 6,
"x": 1
},{
"z": 3,
"y": 6,
"x": 1
},{
"z": 3,
"y": 6,
"x": 1
}]
},
"c": 1
}
Before installing, backup the original json.lua file. Otherwise it can be restored by reinstalling CET.
Install:
Exract into your Cyberpunk 2077 game folder.
Uninstall:
Restore from backup or extract the single json.lua file from the CET installation archive. Ultimately, reinstall CET.