Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rohitjangid
Copy link
Contributor

@rohitjangid rohitjangid commented May 25, 2023

Add doc for std.parseCsvWithHeader and std.manifestCsv

go-jsonnet PR: google/go-jsonnet#701

@rohitjangid
Copy link
Contributor Author

@sparkprime is it fine to break the compatibility for these functions in cpp implementation?

@rohitjangid rohitjangid force-pushed the feat/csv branch 2 times, most recently from 7df78a0 to a8bebc3 Compare May 25, 2023 10:36
@sparkprime
Copy link
Member

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.
Copy link
Member

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.

Copy link
Contributor Author

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',
Copy link
Member

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

Copy link
Contributor Author

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.
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants