API Data Page - JSON output includes field from Datastructure with NULL value

I was trying to model API Data Page which returns JSON data.

I was expecting to get only fields with values from transformation WF step.

Instead I’ve got all fields from Datastructure.

Example:
Datastructure DS with fields field1, field2, field3, field4 (virtual fields from Virtual Entity)
Datastructure DS has a Workflow method which generates XML for output like this:

<ROOT>
	<DS>
		<field2>3</field2>
		<field3>25</field3>
	</DS>
</ROOT>

but the API Data Page returns JSON like this:


[{
   "field1": null,
   "field2": 3,
   "field3": 25,
   "field4": null
}]

But I would expect JSON like this:

[{
   "field2": 3,
   "field3": 25
}]

The described behaviour is intended functionality. XML doesn’t provide grammar for null values, so we’re not sending the attributes at all. But JSON provides grammar for null values, so the fields are delivered.