# Values and source preservation

Use the value type listed for each attribute. Write JSON values in
`<default>`: `"0012"` is a string, `12` a number, `false` a Boolean and `null`
null. Leaving out `<default>` means no default is supplied. Queries and Lua
scripts use literal text or CDATA, even when the text looks like JSON.
Items remain in the order you write them.
Do not repeat containers such as `<sources>` or `<outputs>`; put all their
entries inside one container. Unknown fields and conflicting settings are errors.
Escape XML entities, or use CDATA; split a literal CDATA terminator across
sections. XML newline normalization applies to authored literal CR; use
`&#13;` when a carriage return must survive. Export handles this explicitly.

To write the whole report as JSON inside XML, use `<definition>` as the
only child of `<report>` and omit all report attributes. `<layout>` stores
a visual document layout as JSON; choose either a layout or a PDF template
for an output. `<table-plan>` stores table selections, filters and ordering
as JSON; its sources and parameters must match those selections.

If the guided editor is available in your installation, switching to it
asks you to confirm that comments and formatting may be replaced. Custom
scripts and templates are edited in XML.