class Avalara::Parser
Protected Instance Methods
decode_json(body)
click to toggle source
Private: This was put in place entirely to appease Ruby 1.9.2-p290’s more strict YAML parsing, which breaks Crack 0.1.8’s JSON decoding.
This will be removed when Crack supports decoding the API’s returned values.
# File lib/avalara/parser.rb, line 33 def decode_json(body) if body.to_s =~ /^(?:[\d]+|null|true|false)$/ MultiJson.decode("[#{body}]").first else MultiJson.decode body end end
json()
click to toggle source
Private: This was put in place entirely to appease Ruby 1.9.2-p290’s more strict YAML parsing, which breaks Crack 0.1.8’s JSON decoding.
This will be removed when Crack supports decoding the API’s returned values.
# File lib/avalara/parser.rb, line 22 def json decode_json(body) end