Jsonnet is a data notation created in 2014 by Dave Cunningham.
#1258on PLDB | 9Years Old | 0Books |
0Papers | 1kRepos |
Try now: Web
// A function that returns an object.
local Person(name='Alice') = {
name: name,
welcome: 'Hello ' + name + '!',
};
{
person1: Person(),
person2: Person('Bob'),
}
Feature | Supported | Token | Example |
---|---|---|---|
Comments | ✓ | // A comment |
|
MultiLine Comments | ✓ | /* */ | /* A comment */ |
Line Comments | ✓ | // | // A comment |
Lists | ✓ | [1, 2, 3] |
|
Maps | ✓ | {"name": "Mary"} |
|
Strings | ✓ | "hello world" |
|
Integers | ✓ | 80766866 |
|
Floats | ✓ | 2.3 |
|
Booleans | ✓ | false |
|
Semantic Indentation | X | ||
Case Insensitive Identifiers | X | ||
Multiline Strings | X | ||
File Imports | X | ||
Ternary operators | X | ||
Conditionals | X | ||
Macros | X | ||
Disk Output | X |