Kirby save blocks data in json format instead of yaml

,

I heritate from a kirby website which remain in version 3.5.

I manage to update it to 3.10 first, converting existing builder type fieldset to blocks (needed a lot of work) and then to v4.9.6.

I updated all pugins too.

It’s working but it has a very weird behavior no matter which kirby version I use between 3.10, 4.7 and 4.9.6.

When I modify a page and save it, the content of a block type is saved as a json format (it’s what is seems to me at least) instead of yaml.

For example something like :

Sections:

-
  text: |
    **awesome text of this website.**

    Some more text
  _key: markdown
  _uid: intro_1756724842605_2966

will then be saved like that :

Sections: [{"content":{"text":"**awesome text of this website**\n\Some more text"},"id":"764f0fb5-b4a3-471d-9a3d-7ee86277af9f","isHidden":false,"type":"markdown"}]

Which is not nice to read. It’s doing that only (for what I have been testing) for blocks types. The reste of .txt files remain as yaml format.

I believe it shouldn’t be like that. Could someone confirm it?

If it shouldn’t, does anyone have any idea where this behavior could come from and would know how to solve this issue?

I found a solution to make the json look nicer here Content in textfile structure for blocks - #3 by thePhrase but is json mandatory with blocks?

Yes, blocks store their content as JSON. There were too many issues with yaml and blocks and nested content.