Skip to content

Commit 0bf8b39

Browse files
doc: document the std.manifestJson function
It was added to std.jsonnet at the same time as manifestJsonEx so it has the same available-since version.
1 parent f324ff7 commit 0bf8b39

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

doc/_stdlib_gen/stdlib-content.jsonnet

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,13 +806,49 @@ local html = import 'html.libsonnet';
806806
},
807807
],
808808
},
809+
{
810+
name: 'manifestJson',
811+
params: ['value'],
812+
availableSince: '0.10.0',
813+
description: |||
814+
Convert the given object to a JSON form. Under the covers,
815+
it calls <code>std.manifestJsonEx</code> with a 4-space indent:
816+
|||,
817+
examples: [
818+
{
819+
input: |||
820+
std.manifestJson(
821+
{
822+
x: [1, 2, 3, true, false, null,
823+
"string\nstring"],
824+
y: { a: 1, b: 2, c: [1, 2] },
825+
})
826+
|||,
827+
output:
828+
std.manifestJson(
829+
{
830+
x: [
831+
1,
832+
2,
833+
3,
834+
true,
835+
false,
836+
null,
837+
'string\nstring',
838+
],
839+
y: { a: 1, b: 2, c: [1, 2] },
840+
}
841+
),
842+
},
843+
],
844+
},
809845
{
810846
name: 'manifestJsonMinified',
811847
params: ['value'],
812848
availableSince: '0.18.0',
813849
description: |||
814850
Convert the given object to a minified JSON form. Under the covers,
815-
it calls <code>std.manifestJsonEx:')</code>:
851+
it calls <code>std.manifestJsonEx</code>:
816852
|||,
817853
examples: [
818854
{

0 commit comments

Comments
 (0)