Mojira Archive
MC-268501

Command Block Shows Command with JSON Content as valid while it's invalid

I add this as a result from this task:

https://bugs.mojang.com/browse/MC-267619

 

I faced the problem and cared about your advice about this being a result of stricter json.

Howeer, if so, I would expect the command block to show the command as invalid.

 

Here's an example:

/give @p written_book{pages:['{"text":"Page 1","clickEvent":{"action":"change_page","value":2}}','\{"text":"Page 2"}'],title:Test,author:Test} 

This command is valid in 1.20.2 and invalid 1.20.4 due to "value":2

In the command block of 1.20.4, it's shown as valid.

However, the command result in an invalid book, this here is the correct one:

/give @p written_book{pages:['{"text":"Page 1","clickEvent":{"action":"change_page","value":"2"}}','\{"text":"Page 2"}'],title:Test,author:Test} 

So the bug: If the JSON parse for books is strict, invalid JSON strings should be shown as invalid in command blocks.

Invalid

LordRazen

2024-02-11, 09:12 PM

2024-02-12, 12:08 AM

2024-02-12, 12:08 AM

0

0

Unconfirmed

(Unassigned)

1.20.4

-