Reference
File Extension
Section titled “File Extension”Recommended: .lpml
Alternative: .json or .json5 for editor syntax highlighting
Differences from JSON5
Section titled “Differences from JSON5”| Feature | JSON5 | LPML |
|---|---|---|
| Comments | ✓ | ✓ |
| Trailing commas | ✓ | ✓ |
| Unquoted keys | ✓ | ✓ |
| Spacey keys | ✗ | ✓ |
| Single quotes | ✓ | ✓ |
| Hex numbers | ✓ | ✓ |
| Octal/binary numbers | ✗ | ✓ |
| MAX_INT/MAX_FLOAT | ✗ | ✓ |
| String concatenation | ✗ | ✓ |
| File includes | ✗ | ✓ |
| Multiline folding | ✗ | ✓ |
Grammar Summary
Section titled “Grammar Summary”value ::= object | array | string | number | boolean | null | 'undefined' | 'Infinity' | 'NaN' | 'MAX_INT' | 'MAX_FLOAT'object ::= '{' members? '}'members ::= pair (',' pair)* ','?pair ::= key ':' valuekey ::= identifier | spacey_key | stringspacey_key ::= (char - ':' - '\n')+ // any run up to the first ':', trimmed; spaces, hyphens, UTF-8 all okarray ::= '[' elements? ']'elements ::= value (',' value)* ','?string ::= '"' chars '"' | "'" chars "'" | string string // concatenationnumber ::= hex | octal | binary | decimalboolean ::= 'true' | 'false'null ::= 'null'comment ::= '//' [^\n]* | '/*' .*? '*/'Credits
Section titled “Credits”Created by Gesslar. Based on the JSON5 specification.
License
Section titled “License”Unlicense — public domain.