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

argus allows duplicate field names #59

Closed
ilawjr opened this issue Sep 29, 2020 · 2 comments
Closed

argus allows duplicate field names #59

ilawjr opened this issue Sep 29, 2020 · 2 comments
Assignees
Labels
bug Something isn't working needs discussion Further discussion is needed to move forward

Comments

@ilawjr
Copy link

ilawjr commented Sep 29, 2020

argus accepts json payloads with non-unique object names:
e.g.
{"identifier" : "minimal0","data": {"mini":"mouse"},"ttl":300,"identifier" : "minimal1","data": {"mini":"mouse"},"ttl":600}

which is stored as (ignore ttl decreasing value):
{"identifier":"minimal1","data":{"mini":"mouse"},"ttl":578}

It replaces the value of the first occurrence with the value of the last occurrence of the name. The json syntax doesn't require unique identifiers. The json lint validator flags this as invalid json.

@ilawjr ilawjr added bug Something isn't working needs discussion Further discussion is needed to move forward labels Sep 29, 2020
@joe94
Copy link
Member

joe94 commented Nov 11, 2020

Good to keep this around but I doubt we can change this as JSON parsing is done by the golang standard library.

@joe94
Copy link
Member

joe94 commented Nov 13, 2020

Duplicate of #60

@joe94 joe94 marked this as a duplicate of #60 Nov 13, 2020
@joe94 joe94 closed this as completed Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs discussion Further discussion is needed to move forward
Projects
None yet
Development

No branches or pull requests

2 participants