Some benchmakring, and a as_json method