Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Suppose I am returning data like this in rest api:

{
name:"Ronald",
age:25,
salary:1500
}

But what should I use to design variable names as I want? For example:

{

Name: "Ronald",
Age:25,
Salary:1500
}

How can I design that only variable names start with a capital letter? As you know, variable names are called camelCase in Java.

What I have tried:

I tried to using annotation, but I couldn't find.
Posted
Updated 6-Dec-21 5:43am

1 solution

Quote:
The schema helps in a multiple way. It acts as a contract between two teams, serves as a specification, simple to read and easy to follow and you can use it for validation once your APIs are ready.

JSON Schema - as a specification, contract and validation![^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900