Method: JSON::ModuleMethods#unparse

Defined in:
lib/fjson.rb

#unparse(obj, state = nil) ⇒ Object

Unparse the Ruby data structure obj into a single line JSON string and return it. state is a JSON::State object, that can be used to configure the output further.



167
168
169
# File 'lib/fjson.rb', line 167

def unparse(obj, state = nil)
  obj.to_json(JSON::State.from_state(state))
end