testsuite:
* more tests for write_json
* testcases that check the type information