add JSON, fix catalog

JSON parser parses a JSON string into a Lua structure
Catalog was being added to the wrong lua state