Bring back encode_json() as an ES method instead of function