Fixes #150: explicitly converting some Java elements to JSON objects/arrays to avoid this problem