Skip to content

Commit

Permalink
doc: document the std.manifestJson function
Browse files Browse the repository at this point in the history
It was added to std.jsonnet at the same time as manifestJsonEx so it
has the same available-since version.
  • Loading branch information
johnbartholomew committed Apr 16, 2024
1 parent f324ff7 commit 0bf8b39
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion doc/_stdlib_gen/stdlib-content.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -806,13 +806,49 @@ local html = import 'html.libsonnet';
},
],
},
{
name: 'manifestJson',
params: ['value'],
availableSince: '0.10.0',
description: |||
Convert the given object to a JSON form. Under the covers,
it calls <code>std.manifestJsonEx</code> with a 4-space indent:
|||,
examples: [
{
input: |||
std.manifestJson(
{
x: [1, 2, 3, true, false, null,
"string\nstring"],
y: { a: 1, b: 2, c: [1, 2] },
})
|||,
output:
std.manifestJson(
{
x: [
1,
2,
3,
true,
false,
null,
'string\nstring',
],
y: { a: 1, b: 2, c: [1, 2] },
}
),
},
],
},
{
name: 'manifestJsonMinified',
params: ['value'],
availableSince: '0.18.0',
description: |||
Convert the given object to a minified JSON form. Under the covers,
it calls <code>std.manifestJsonEx:')</code>:
it calls <code>std.manifestJsonEx</code>:
|||,
examples: [
{
Expand Down

0 comments on commit 0bf8b39

Please sign in to comment.