o2json is a tool to convert LPC save file to JSON, combined with json2o, it can enable you to manipulate LPC save file using JSON tools.
./o2json [flags] o_file json_file
if o_file is -, this program will read from stdin, and if json_file is -, this program will write to stdout,
you can then pipe the output to other programs.
| Flag | Description |
|---|---|
-prtty |
Print JSON with newline and indent |
-ascii |
Print all non-ascii characters in \uXXXX escaped format. |
The JSON output is an object with the following fields:
{
"program_name": "program_name",
"variables": [ variable_object ]
}
The variable_object is an object with the following fields:
{
"name": "variable_name",
"value": svalue
}
The svalue is a object with the following fields:
{
"type": type,
"value": value
}
The type is a string, it can be one of the following values:
"int", "float", "string", "array", "mapping", "buffer"
The value is either a number, a string, or an array of svalue objects.