explicit conversion to_json based on JSON being defined