Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Generate JSON docs with Gson

Open Pikachu920 opened this issue 2 years ago • 1 comments

Description

This PR switches the JSON doc generation to Gson (which is included w/ spigot). The current generation method (I think it's just some string replacing) often generates invalid JSON. Switching to Gson should help prevent this as Gson will deal with the JSON generation, while we just provide the data.

You can see the generated JSON here: https://docs.skriptlang.org/nightly/fix/json-docs/docs.json


Target Minecraft Versions: N/A Requirements: N/A Related Issues: https://github.com/SkriptLang/skript-docs/issues/31

Pikachu920 avatar Jun 10 '23 22:06 Pikachu920

By default, GSON escapes strings containing HTML content. This is the intended behaviour, but for some reason the escaping occurs several times, as can be seen in the JSON for some examples.

Romitou avatar May 09 '24 21:05 Romitou