API 4 Explorer output is inconsistent for serialized fields in JSON view
Edit: See discussion below.
If we use API 4 to save JSON values for a JSON field, the JSON gets mucked up because the API expects an array. I suppose this works in a sense, but in another sense it is weird that you can't, for example, copy an entity by getting it from API 4 and then creating with the same values (because the API gives you JSON, but won't accept it).
If this is the expected behaviour, at least I can document it.
If we pass in {"something": "thing"}
, what gets saved in the database is [{"something": "thing"}]
.
If we use a save action and pass in a records
array with a JSON value, what gets saved in the database is ["{\"something\": \"thing\"}"]
.