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

Inconsistent JSON Request & Response Params #25

Open
subins2000 opened this issue Oct 2, 2020 · 9 comments
Open

Inconsistent JSON Request & Response Params #25

subins2000 opened this issue Oct 2, 2020 · 9 comments

Comments

@subins2000
Copy link
Member

Currently varnamd's JSON requests and responses are very inconsistent. Some has capitalized JSON properties, others full small letters. This inconsistency should be fixed.

Examples :
https://api.varnamproject.com/languages
https://api.varnamproject.com/tl/ml/Malayalam

Same problem with request params

@joicemjoseph
Copy link

https://api.varnamproject.com/tl/ml/malayalam and
https://api.varnamproject.com/tl/ml/Malayalam
returns same response.

(It is because of language feature.)

@subins2000
Copy link
Member Author

I mean the response JSON params. While https://api.varnamproject.com/tl/ml/Malayalam returns with JSON properties all small letters (success), https://api.varnamproject.com/languages reeturns with DisplayName like structure

@subins2000
Copy link
Member Author

subins2000 commented Oct 4, 2020

The standard JSON outputs usually have property names all small letters, IMO we should use full lowercases and underscores if needed.

Sample Wikipedia JSON output

Their output also uses camelCase and underscore. They're too inconsistent, what shall we stick to ? My vote is for small letters and underscore

@joicemjoseph
Copy link

The standard JSON outputs usually have property names all small letters, IMO we should use full lowercases and underscores if needed.

Sample Wikipedia JSON output

Their output also uses camelCase and underscore. They're too inconsistent, what shall we stick to ? My vote is for small letters and underscore

But, if we are migrating to new editor, we can change.

@subins2000
Copy link
Member Author

Yeah, where should the change be to is the question ? Small case & underscore is a better way IMO

@joicemjoseph
Copy link

This will be a breaking change. @navaneeth, what is your comment on this ?
?

@subins2000
Copy link
Member Author

Related: #8

From that, I infer lowercase is preferred

@joicemjoseph
Copy link

We can change to lowercase.
This change could break some third party apps depending on varnam api.
We can do list out them and send a notification regarding this breaking change.
Otherwise, this may make some issues for those third party apps.

@subins2000
Copy link
Member Author

For packs, I have chosen lowercase. This issue remains. This is a good beginner issue to work on. So I'm gonna keep this as is.

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

No branches or pull requests

2 participants