# module String::RawConverter

##
Overview

Converter to be used with `JSON.mapping` to read the raw value of a JSON object property as a `String`.

It can be useful to read ints and floats without losing precision, or to read an object and deserialize it later based on some condition.

    require "json"

    class Raw
      JSON.mapping({
        value: {type: String, converter: String::RawConverter},
      })
    end

    raw = Raw.from_json(%({"value": 123456789876543212345678987654321}))
    raw.value   # => "123456789876543212345678987654321"
    raw.to_json # => %({"value":123456789876543212345678987654321})

##
Defined in:

##
Class Method Summary

- .from_json(value : JSON::PullParser)
- .to_json(value : String, json : JSON::Builder)

##
Class Method Detail

def self.from_json(value : JSON::PullParser) #
def self.to_json(value : String, json : JSON::Builder) #