Fix JSON documentation

Fixed some errors and added usage of the `decode` function