Class: LazyJson::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/lazy-json.rb

Direct Known Subclasses

Array, LazyValue, Object, Primitive

Instance Method Summary collapse

Constructor Details

#initialize(seq) ⇒ Value

Returns a new instance of Value.



158
159
160
# File 'lib/lazy-json.rb', line 158

def initialize(seq)
  @seq = seq
end

Instance Method Details

#parseObject



162
163
164
# File 'lib/lazy-json.rb', line 162

def parse
  Oj.load(@seq.to_s) # Note JSON.parse fails on primitives since they're invalid as documents
end