3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 07:05:44 +01:00

Round-trip JSON keys holding a backslash, quote or control character, and generate them in the properties

This commit is contained in:
2026-10-08 12:15:16 +02:00
committed by Lillem4n
parent 8d1c75fa8b
commit bfe26dd438
4 changed files with 68 additions and 14 deletions
@@ -0,0 +1,53 @@
{
"content": [
{
"attrs": {
"extensionKey": "toc",
"extensionType": "com.atlassian.confluence.macro.core",
"parameters": {
"back\\slash": 1,
"nested\\": {
"in\\\"ner": true
},
"nul\u0000": 2,
"say \"hi\"": 3,
"tab\tand\u001fus": 4
}
},
"type": "extension"
},
{
"attrs": {
"back\\slash": 1,
"nul\u0000": 2,
"say \"hi\"": 3,
"tab\tand\u001fus": 4
},
"type": "unknownBlock"
},
{
"content": [
{
"text": "See ",
"type": "text"
},
{
"attrs": {
"back\\slash": 1,
"nul\u0000": 2,
"say \"hi\"": 3,
"tab\tand\u001fus": 4
},
"type": "unknownInline"
},
{
"text": " now.",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}
@@ -0,0 +1,14 @@
!adf:extension {extensionKey=toc extensionType="com.atlassian.confluence.macro.core" parameters="{\"back\\\\slash\":1,\"nested\\\\\":{\"in\\\\\\\"ner\":true},\"nul\\u0000\":2,\"say \\\"hi\\\"\":3,\"tab\\tand\\u001fus\":4}"}
```adf:unknownBlock
{
"attrs": {
"back\\slash": 1,
"nul\u0000": 2,
"say \"hi\"": 3,
"tab\tand\u001fus": 4
}
}
```
See !adf:carry{json="{\"attrs\":{\"back\\\\slash\":1,\"nul\\u0000\":2,\"say \\\"hi\\\"\":3,\"tab\\tand\\u001fus\":4},\"type\":\"unknownInline\"}"} now.