-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add doc for std.parseCsv and std.manifestCsv #1088
base: master
Are you sure you want to change the base?
Conversation
@sparkprime is it fine to break the compatibility for these functions in cpp implementation? |
7df78a0
to
a8bebc3
Compare
Yes I think we can break compatibility for newly introduced library functions at this point. |
If <code>json</code> param is not a valid csv compatible object, it would be an error. | ||
|||), | ||
html.p({}, ||| | ||
The <code>headers</code> param adds is an optional which would default to all fields in the object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only looks at the first row, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -681,6 +681,20 @@ local html = import 'html.libsonnet'; | |||
}, | |||
], | |||
}, | |||
{ | |||
name: 'parseCsv', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs updating to the new name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
params: ['str', 'delimiter=","'], | ||
availableSince: 'upcoming', | ||
description: ||| | ||
Parses a CSV string into JSON. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to mention how the first row is interpreted as a header row and must have unique column names, which then are used as fields in the JSON representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Add doc for
std.parseCsvWithHeader
andstd.manifestCsv
go-jsonnet PR: google/go-jsonnet#701