crit: add ability to convert to/from json
test: crit: test json converter