Create JSON scheme with value to null
Hello,
I want to create a service with JSON output, I want the output to always have the same structure.
For example my structure is composed of 3 fields (field1, field2 and field3), sometimes one or several fields are null, but I want to see them in my output, regardless.
In my code I have :
result = {
field1 : "some value",
field2 : null,
field3 : "other value"
}
but my service gives me only :
{
field1 : "some value",
field3 : "other value"
}
How can I have field2 please ?

