add tests for JsonReader + Refactoring