Most JSON tags in Minecraft have (relatively) recently updated to using strict JSON--meaning the property names must/can be in quotes. However, if you try to /give someone a written_book with a strict-JSON tag, it shows the "Invalid Book Tag" message inside it. The same tag in loose JSON (i.e. without quotes around the property names) doesn't give that error.
However, the books still don't work properly: if you /give someone a written_book with defined pages which are strings, it will only show the first word on each page and stop parsing at the first space. I haven't tested this with JSON strings yet, but simple strings definitely have this problem.
To reproduce:
Issue Part 1: Put this command in a command block:
/give @p minecraft:written_book 1 0 {"generation":1, "author":"IceMetalPunk", "title":"Ancient Scroll", "pages":["This is an old book.","Is it cool to you?"], "resolved":0b}
When the book is opened, it says Invalid Book Tag.
Issue Part 2: Put this command in a command block:
/give @p minecraft:written_book 1 0 {generation:1, author:"IceMetalPunk", title:"Ancient Scroll", pages:["This is an old book.","Is it cool to you?"], resolved:0b}
Expected: First page should say "This is an old book.", second should say "Is it cool to you?"
Actual result: First page says "This", second page says "Is".
Comments 3
That's if you're using JSON text for page contents, but according to the Gamepedia Wiki, the pages property can take either JSON or plain strings. If that's not the case, I'd expect plain strings to give an invalid tag error, but instead it just displays the first word of each page and not the rest. Additionally, since strict JSON tags are supported everywhere else and required in some cases, I'd expect strict JSON to be supported properly here as well rather than giving an invalid tag error.
The JSON syntax only apply to specific tag like Text1-4 in sign or pages in books, or commands like tellraw. NBT syntax is still the only valid syntax required in data tags. The page tag need to be an array of valid JSON String. "abc" is not considered valid, you have to use :
"[\"abc\"]" or "{\"text\":\"abc\"}"."[\"abc\"]" or "{\"text\":\"abc\"}".A valid syntax should be :
/give @p minecraft:written_book 1 0 {generation:1,author:"IceMetalPunk",title:"Ancient Scroll",pages:["[\"This is an old book\"].","[\"Is it cool to you?\"]"],resolved:0b}/give @p minecraft:written_book 1 0 {generation:1,author:"IceMetalPunk",title:"Ancient Scroll",pages:["[\"This is an old book\"].","[\"Is it cool to you?\"]"],resolved:0b}
It may be your format; https://raw.githubusercontent.com/TheWebmage/commands-json/master/Magic%20Book shows an example of a 1.8 /give written_book command.