Separate JSON-encoding functionality from frame functions