Class: CodeRay::Scanners::JSON

Inherits:
Scanner
  • Object
show all
Defined in:
lib/coderay/scanners/json.rb

Overview

Scanner for JSON (JavaScript Object Notation).

Constant Summary collapse

KINDS_NOT_LOC =
[
  :float, :char, :content, :delimiter,
  :error, :integer, :operator, :value,
]
ESCAPE =

:nodoc:

/ [bfnrt\\"\/] /x
UNICODE_ESCAPE =

:nodoc:

/ u[a-fA-F0-9]{4} /x
KEY =
/ (?> (?: [^\\"]+ | \\. )* ) " \s* : /x

Constants inherited from Scanner

Scanner::DEFAULT_OPTIONS, Scanner::ScanError

Instance Attribute Summary

Attributes inherited from Scanner

#state

Attributes included from Plugin

#plugin_id

Method Summary

Methods inherited from Scanner

#binary_string, #column, #each, encoding, file_extension, #file_extension, #initialize, #lang, lang, #line, normalize, #reset, #string=, #tokenize, #tokens

Methods included from Plugin

#aliases, #plugin_host, #register_for, #title

Constructor Details

This class inherits a constructor from CodeRay::Scanners::Scanner