JSON generation fixed - to_json method has to accept extra params