fix: rename 'to_json' to 'to_h'