unit tests for json works