Content API (4.4.0) is not nesting JSON from a JSON field

I am performing a migration from 3.5.0 to 4.4.0. Overall the whole process seem seamless. I was able to restore my 3.5.0 backup on 4.4.0 without any issues.

However, I am resting my webapp against the 4.4.0 cms and seeing issue with the Content API with existing json fields.

I am using JSON field type in a schema called Site.

When using the API in 4.4.0, the sitemap data ended in a single string, instead of being nested json, as I normally expect.

When I use the GraphQL querySiteContent, the json is nested as I expect.

In 3.5.0, when I access the same data via the API, the json is nested.

I am trying to know if there is something I missed to in my migration? A configuration setting? Or could have executed the migration a bit differently?

Should I only trust the GraphQL? I would have to rework the web application to query/parse much differently.


Can you provide me a backup of your mongo database as a archive (–archive) before the migration?

Hi Sebastian, no problem. I put a password protected archive in MS OneDrive. Can I send the password to you via email?

Mongodump used; The DB in question - SquidexProd, SquidexContentsProd.


I take this conversation to ask a question.
As I see on your screen, there is (was) a way retrieving nested Items in the Rest Api ?
I’ve looked everywhere, and found no way to do this.
I’m retrieving nodes recursively one by one, an was about to post a feature request… but if this feature exists, I really would like to know how to do this.


The post creator is talking about array fields. I guess you are talking about references. The graphql is your friend.

Sorry: JSON fields

1 Like

indeed, I read too fast :wink:
graphql can hlp retrieving the whole tree, even if I don’t know how deep to dig, and the node types ?

You are right, graphql is very concrete about this. But it cannot be solved in an efficient way anyway.

If you have self referencing items I would just get all items and build the tree on the client.

@Sebastian Just checking back if you had a chance to inspect my original issue. Thanks again for all you help with this versatile application/project.

Not yet, sorry…I will update this thread of course.

1 Like

Can you send me the password as PM again?

I can reproduce it, but I cannot explain how it happened. You have a draft for the content, so the published version is buggy. You can probably fix it but just publishing the draft again.

Because it is only one document I recommend to just ignore it.

Okay - Thanks Sebastian for taking a look at these items. Much appreciated.
I will examine my important and try saving/publishing the draft. I am lucky with the site type, it’s a technically a single item.
I am going to also look into moving everything to a graphql query as well.