class Symbol

def to_json(state = nil, *a)


# {"json_class":"Symbol","s":"foo"}

Output:

puts :foo.to_json
require 'json/add/symbol'

Returns a JSON string representing +self+:
def to_json(state = nil, *a)
  state = ::JSON::State.from_state(state)
  if state.strict?
    super
  else
    as_json.to_json(state, *a)
  end
end