Method: Jansson::FFI::Entity.from_s
- Defined in:
- lib/jansson/ffi/ext/entity.rb
.from_s(string, flags = LOAD_DECODE_ANY | LOAD_ALLOW_NUL) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 |
# File 'lib/jansson/ffi/ext/entity.rb', line 17 def self.from_s(string, flags = LOAD_DECODE_ANY | LOAD_ALLOW_NUL) error = FFI::Error.new entity = FFI.json_loads(string, flags, error) entity.pointer.null? ? error : entity end |