This page describes the NiceDump version 1.0 format.
A parsable NiceDump is created in the following way:
=====BEGIN NICE-DUMP=====
to the result.=====END NICE-DUMP=====
to the result.=====BEGIN NICE-DUMP=====
and =====END NICE-DUMP=====
lines MAY be arbitrary and MUST NOT be considered a part of the NiceDump.<!--
and -->
This example will create a NiceDump for the string variable "Foo Bar".
Create the JSON representation:
{
"name": "My String",
"value": "Foo Bar",
"type": "string",
"size": 7
}
Base64-encode:
ewogICAgIm5hbWUiOiAiTXkgU3RyaW5nIiwKICAgICJ2YWx1ZSI6ICJGb28gQmFyIiwKICAgICJ0
eXBlIjogInN0cmluZyIsCiAgICAic2l6ZSI6IDcKfQ==
Prepend and append the NiceDump header and footer:
=====BEGIN NICE-DUMP=====
ewogICAgIm5hbWUiOiAiTXkgU3RyaW5nIiwKICAgICJ2YWx1ZSI6ICJGb28gQmFyIiwKICAgICJ0
eXBlIjogInN0cmluZyIsCiAgICAic2l6ZSI6IDcKfQ==
=====END NICE-DUMP=====
Done! A NiceDump reader can now parse this and might display something like this:
My String: "Foo Bar" string[7]
An item corresponds to a basic entry in the NiceDump.
A comment for the item.
Name | comment |
Type | string |
Example | {"comment": "Internal class"} |
Tells whether the item is static or not. Default value is false
.
Name | isStatic |
Type | bool |
Example | {"isStatic": true} |
A list of items.
Items is an array of objects where each contains an optional key
and a mandatory value
. The key
and value
contains each another item.
Name | items |
Type | array |
Example | {"items": [
{"key": {…}, "value": {…}},
{"value": {…}}
]} |
key
MAY be present in the array object, and if so MUST contain an item.value
MUST be present in the array object, and MUST contain an item.The name of the item.
Name | name |
Type | string |
Example | {"name": "Foo Bar"} |
The relation between the item and a parent item.
Name | rel |
Type | string |
Example | {"rel": "parent"} |
parent
(for a parent class item).The size of the item, e.g. the size of an array or a string.
Name | size |
Type | number |
Example | {"size": 4} |
The native type name for the item or any of _group_
, _text_
.
Name | type |
Type | string |
Example | {"type": "string"} |
_group_
, _text_
._text_
._group_
, items SHOULD also be present._group_
, a parser MAY choose to un-group the underlying items to the same level as the item.null
, bool
, int
, float
, string
, array
, object
, resource
, _group_
, _text_
.The specific name for the type, e.g. the class name for an object.
Name | typeName |
Type | string |
Example | {"typeName": "FooClass"} |
object
.The value to display for the item.
Name | Value |
Type | string |
Example | {"value": "42"} |
The visibility for the item.
Name | visibility |
Type | string |
Example | {"visibility": "public"} |
public
, protected
, private
.