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

Fix duplicate or invalid json fields #218

Merged
merged 6 commits into from
Jul 20, 2023
Merged

Conversation

VojtechVitek
Copy link
Contributor

@VojtechVitek VojtechVitek commented Jul 20, 2023

Fixes #66

The following duplicate fields (in JSON) will now error out.

struct Simple
  - Field1: string
      + json = field_1
  - Field2: string
      + json = field_1
struct Simple
  - Field1: string
  - Field2: string
      + json = Field1

Breaking change:
Go users are expected to use go.tag.json in RIDL instead of json for special tags like ,omitempty or ,string.

 - FieldName
-    + json = field_name,omitempty
+    + json = field_name
+    + go.tag.json = field_name,omitempty

@VojtechVitek VojtechVitek merged commit 35b6b82 into webrpc:master Jul 20, 2023
4 checks passed
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.

"-" fieldtag generates valid Go but invalid Javascript client
1 participant