# File lib/dm-serializer/to_json.rb, line 55
    def to_json(*args)
      options = args.first
      options = {} unless options.kind_of?(Hash)

      result = as_json(options)

      # default to making JSON
      if options.fetch(:to_json, true)
        MultiJson.encode(result)
      else
        result
      end
    end