Online JIN Playground
Run
Clear Buffer
; This is an example JIN file [section] ; Null becomes native null field0 = null ; Strings field1 = A string value. ; comment is stripped field2 = "A quoted string value ; no stripping" field3 = < A multi-line string value is also ; but remember possible. ; comments are stripped > field4 = <" Quote the multi-line string to ; ensure comments aren't stripped "> ; Integers become native integer field5 = 1 ; Floats become native floats field6 = 3.14 ; Booleans become native booleans field7 = true ; Arrays, note: trailing commas are fine field8 = [ "item1", "item2", "item3", ] ; Objects, note: trailing commas are fine field9 = { "key1": "item1", "key2": "item2", } ; Subsections use & to reference the parent [&.subsection] field1 = true ; Add more &s to keep going [&&.subsubsection] ; Functions, note run() is sandboxed for safety ; Returns result eval'd in host language (PHP) field1 = env(TIMEZONE) field2 = run($app->getEnvironment('TIMEZONE')) [classes] ; No need to escape a slash in JSON values ; But... you can't do other escapes, e.g. \n, \t field1 = ["My\Namespaced\Class"] [templates] ; Definitions a template for use with map() and inc() field1 = def(var1, var2, var3) { [$var1, $var2, $var3] } ; For multiple entries, each line maps to template field2 = map(templates.field1) { Tab Separated Array Of Other Arrays } ; For a single entry, each line maps to arg field3 = inc(templates.field1) { New Line Separated Templating }
}