Skip to content

Add a --schema option to the JSON parser #3295

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

Merged
merged 4 commits into from
Jul 4, 2023

Conversation

dominiklohmann
Copy link
Member

The new option allows for setting the target schema name explicitly.

@dominiklohmann dominiklohmann added the feature New functionality label Jul 3, 2023
@dominiklohmann dominiklohmann requested a review from patszt July 3, 2023 15:27
@dominiklohmann dominiklohmann force-pushed the topic/json-known-schema branch from 4838019 to c7ce7da Compare July 3, 2023 15:29
The new option allows for setting the target schema name explicitly.
@dominiklohmann dominiklohmann force-pushed the topic/json-known-schema branch from c7ce7da to 1ec2a70 Compare July 3, 2023 15:30
@patszt
Copy link
Contributor

patszt commented Jul 3, 2023

I think this line must be adapted to enable proper working of --no-infer.
https://github.com/tenzir/tenzir/pull/3295/files#diff-acb3f00b39defb32abdaaff714123837f32ad305710aadf4ebfcdb55a6651797L679

Should be if (no_infer and (selector or schema)) then use strict_validator.

@dominiklohmann dominiklohmann force-pushed the topic/json-known-schema branch from ec1977c to e191132 Compare July 3, 2023 17:29
@dominiklohmann
Copy link
Member Author

I think this line must be adapted to enable proper working of --no-infer. https://github.com/tenzir/tenzir/pull/3295/files#diff-acb3f00b39defb32abdaaff714123837f32ad305710aadf4ebfcdb55a6651797L679

Should be if (no_infer and (selector or schema)) then use strict_validator.

Fantastic, that worked!

Copy link
Contributor

@patszt patszt left a comment

Choose a reason for hiding this comment

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

Looks good. Good that we have a test now!

@dominiklohmann dominiklohmann merged commit 5da5467 into main Jul 4, 2023
@dominiklohmann dominiklohmann deleted the topic/json-known-schema branch July 4, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants