To_json options delegation

Added ability to pass options to to_json method