Skip to content

Reference

Recommended: .lpml

Alternative: .json or .json5 for editor syntax highlighting


FeatureJSON5LPML
Comments
Trailing commas
Unquoted keys
Spacey keys
Single quotes
Hex numbers
Octal/binary numbers
MAX_INT/MAX_FLOAT
String concatenation
File includes
Multiline folding

value ::= object | array | string | number | boolean | null
| 'undefined' | 'Infinity' | 'NaN' | 'MAX_INT' | 'MAX_FLOAT'
object ::= '{' members? '}'
members ::= pair (',' pair)* ','?
pair ::= key ':' value
key ::= identifier | spacey_key | string
spacey_key ::= (char - ':' - '\n')+ // any run up to the first ':', trimmed; spaces, hyphens, UTF-8 all ok
array ::= '[' elements? ']'
elements ::= value (',' value)* ','?
string ::= '"' chars '"' | "'" chars "'" | string string // concatenation
number ::= hex | octal | binary | decimal
boolean ::= 'true' | 'false'
null ::= 'null'
comment ::= '//' [^\n]* | '/*' .*? '*/'

Created by Gesslar. Based on the JSON5 specification.

Unlicense — public domain.