Sha256: b2ef2e998edd155a6d822690d39d0ee6939c79de8e05383128ef5a55035bc906
Contents?: true
Size: 414 Bytes
Versions: 19
Compression:
Stored size: 414 Bytes
Contents
module Pubnub class Parser # Parses string to JSON def self.parse_json(string) begin return JSON.parse(string) rescue JSON::ParserError => e return Pubnub::Envelope.format_after_json_error(string, e) end end def self.valid_json?(string) begin JSON.parse(string) true rescue JSON::ParserError false end end end end
Version data entries
19 entries across 19 versions & 1 rubygems