Module: Candid::Internal::JSON::Serializable

Included in:
Types::Type
Defined in:
lib/candid/internal/json/serializable.rb

Instance Method Summary collapse

Instance Method Details

#dump(value) ⇒ String

Dumps data from its deserialized form into JSON

Parameters:

  • value (Object)

    The deserialized value

Returns:

  • (String)

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/candid/internal/json/serializable.rb', line 19

def dump(value)
  raise NotImplementedError
end

#load(str) ⇒ Object

Loads data from JSON into its deserialized form

Parameters:

  • str (String)

    Raw JSON to load into an object

Returns:

  • (Object)

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/candid/internal/json/serializable.rb', line 11

def load(str)
  raise NotImplementedError
end