diff --git a/doc/_stdlib_gen/stdlib-content.jsonnet b/doc/_stdlib_gen/stdlib-content.jsonnet
index dd662773d..21dd7f84e 100644
--- a/doc/_stdlib_gen/stdlib-content.jsonnet
+++ b/doc/_stdlib_gen/stdlib-content.jsonnet
@@ -618,6 +618,20 @@ local html = import 'html.libsonnet';
},
],
},
+ {
+ name: 'parseCsv',
+ params: ['str', 'delimiter=","'],
+ availableSince: 'upcoming',
+ description: |||
+ Parses a CSV string into JSON.
+ |||,
+ examples: [
+ {
+ input: "std.parseCsv('id,name\n1,foo\n2,bar')",
+ output: std.parseCsv('id,name\n1,foo\n2,bar'),
+ },
+ ],
+ },
{
name: 'encodeUTF8',
params: ['str'],
@@ -932,6 +946,45 @@ local html = import 'html.libsonnet';
|||),
],
},
+ {
+ name: 'manifestCsv',
+ params: ['json', 'headers=null'],
+ availableSince: 'upcoming',
+ description: [
+ html.p({}, |||
+ Convert the given csv compatible json to a CSV.
+ |||),
+ html.pre({}, |||
+ std.manifestCsv(
+ [
+ {
+ "id": 1,
+ "name": "foo",
+ "x": "baz",
+ },
+ {
+ "id": 2,
+ "name": "bar",
+ },
+ ],
+ ["id", "name"],
+ |||),
+ html.p({}, |||
+ Yields a string containing this CSV:
+ |||),
+ html.pre({}, |||
+ id,name
+ 1,foo
+ 2,bar
+ |||),
+ html.p({}, |||
+ If json
param is not a valid csv compatible object, it would be an error.
+ |||),
+ html.p({}, |||
+ The headers
param adds is an optional which would default to all fields in the object.
+ |||),
+ ],
+ },
{
name: 'manifestXmlJsonml',
params: ['value'],