ruby-lsp-rake 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -0
- data/Rakefile +5 -1
- data/lib/ruby_lsp/ruby_lsp_rake/addon.rb +15 -29
- data/lib/ruby_lsp/ruby_lsp_rake/code_lens.rb +5 -11
- data/lib/ruby_lsp/ruby_lsp_rake/definition.rb +9 -18
- data/lib/ruby_lsp/ruby_lsp_rake/hover.rb +10 -16
- data/lib/ruby_lsp/ruby_lsp_rake/indexing_enhancement.rb +13 -11
- data/lib/ruby_lsp_rake/version.rb +1 -1
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +34 -34
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
- data/sorbet/rbi/gems/{erubi@1.13.0.rbi → erubi@1.13.1.rbi} +27 -22
- data/sorbet/rbi/gems/{json@2.8.2.rbi → json@2.12.0.rbi} +355 -205
- data/sorbet/rbi/gems/{language_server-protocol@3.17.0.3.rbi → language_server-protocol@3.17.0.5.rbi} +2693 -2687
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +86 -0
- data/sorbet/rbi/gems/{logger@1.6.1.rbi → logger@1.7.0.rbi} +120 -77
- data/sorbet/rbi/gems/{minitest@5.25.2.rbi → minitest@5.25.5.rbi} +397 -391
- data/sorbet/rbi/gems/{parallel@1.26.3.rbi → parallel@1.27.0.rbi} +72 -72
- data/sorbet/rbi/gems/{parser@3.3.6.0.rbi → parser@3.3.8.0.rbi} +1080 -1064
- data/sorbet/rbi/gems/{prism@1.2.0.rbi → prism@1.4.0.rbi} +8503 -5856
- data/sorbet/rbi/gems/{rbi@0.2.1.rbi → rbi@0.3.3.rbi} +3175 -968
- data/sorbet/rbi/gems/{rbs@3.6.1.rbi → rbs@3.9.3.rbi} +1857 -1736
- data/sorbet/rbi/gems/{regexp_parser@2.9.2.rbi → regexp_parser@2.10.0.rbi} +1037 -1014
- data/sorbet/rbi/gems/rexml@3.4.1.rbi +5240 -0
- data/sorbet/rbi/gems/{rubocop-ast@1.36.2.rbi → rubocop-ast@1.44.1.rbi} +1771 -1625
- data/sorbet/rbi/gems/{rubocop@1.69.0.rbi → rubocop@1.75.5.rbi} +12342 -9764
- data/sorbet/rbi/gems/ruby-lsp@0.23.19.rbi +7453 -0
- data/sorbet/rbi/gems/{spoom@1.5.0.rbi → spoom@1.6.3.rbi} +3098 -1045
- data/sorbet/rbi/gems/{tapioca@0.16.5.rbi → tapioca@0.16.11.rbi} +821 -791
- data/sorbet/rbi/gems/{unicode-display_width@3.1.2.rbi → unicode-display_width@3.1.4.rbi} +34 -32
- data/sorbet/tapioca/require.rb +1 -2
- metadata +26 -23
- data/sorbet/rbi/gems/ruby-lsp@0.22.1.rbi +0 -6119
@@ -5,19 +5,26 @@
|
|
5
5
|
# Please instead update this file by running `bin/tapioca gem json`.
|
6
6
|
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
8
|
+
class Array
|
9
|
+
include ::Enumerable
|
10
|
+
include ::JSON::Ext::Generator::GeneratorMethods::Array
|
11
|
+
end
|
12
|
+
|
13
|
+
class FalseClass
|
14
|
+
include ::JSON::Ext::Generator::GeneratorMethods::FalseClass
|
15
|
+
end
|
16
|
+
|
17
|
+
class Float < ::Numeric
|
18
|
+
include ::JSON::Ext::Generator::GeneratorMethods::Float
|
19
|
+
end
|
20
|
+
|
21
|
+
class Hash
|
22
|
+
include ::Enumerable
|
23
|
+
include ::JSON::Ext::Generator::GeneratorMethods::Hash
|
24
|
+
end
|
25
|
+
|
26
|
+
class Integer < ::Numeric
|
27
|
+
include ::JSON::Ext::Generator::GeneratorMethods::Integer
|
21
28
|
end
|
22
29
|
|
23
30
|
# = JavaScript \Object Notation (\JSON)
|
@@ -599,7 +606,7 @@ end
|
|
599
606
|
# Without custom addition: "#<Foo:0x0000000006534e80>" (String)
|
600
607
|
# With custom addition: #<Foo:0x0000000006473bb8 @bar=0, @baz=1> (Foo)
|
601
608
|
#
|
602
|
-
# source://json
|
609
|
+
# source://json//lib/json/version.rb#3
|
603
610
|
module JSON
|
604
611
|
private
|
605
612
|
|
@@ -631,7 +638,7 @@ module JSON
|
|
631
638
|
# Output:
|
632
639
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
633
640
|
#
|
634
|
-
# source://json
|
641
|
+
# source://json//lib/json/common.rb#892
|
635
642
|
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
|
636
643
|
|
637
644
|
# :call-seq:
|
@@ -648,14 +655,11 @@ module JSON
|
|
648
655
|
# # Raises SystemStackError (stack level too deep):
|
649
656
|
# JSON.fast_generate(a)
|
650
657
|
#
|
651
|
-
# source://json
|
658
|
+
# source://json//lib/json/common.rb#445
|
652
659
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
653
660
|
|
654
|
-
#
|
655
|
-
|
656
|
-
#
|
657
|
-
# source://json/lib/json/common.rb#313
|
658
|
-
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
661
|
+
# source://json//lib/json/common.rb#937
|
662
|
+
def fast_unparse(*_arg0, **_arg1, &_arg2); end
|
659
663
|
|
660
664
|
# :call-seq:
|
661
665
|
# JSON.generate(obj, opts = nil) -> new_string
|
@@ -693,7 +697,7 @@ module JSON
|
|
693
697
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
694
698
|
# JSON.generate(a)
|
695
699
|
#
|
696
|
-
# source://json
|
700
|
+
# source://json//lib/json/common.rb#424
|
697
701
|
def generate(obj, opts = T.unsafe(nil)); end
|
698
702
|
|
699
703
|
# :call-seq:
|
@@ -701,6 +705,16 @@ module JSON
|
|
701
705
|
#
|
702
706
|
# Returns the Ruby objects created by parsing the given +source+.
|
703
707
|
#
|
708
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
709
|
+
# like from your own database server or clients under your control, it could
|
710
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
711
|
+
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
712
|
+
#
|
713
|
+
# Since JSON version 2.8.0, `load` emits a deprecation warning when a
|
714
|
+
# non native type is deserialized, without `create_additions` being explicitly
|
715
|
+
# enabled, and in JSON version 3.0, `load` will have `create_additions` disabled
|
716
|
+
# by default.
|
717
|
+
#
|
704
718
|
# - Argument +source+ must be, or be convertible to, a \String:
|
705
719
|
# - If +source+ responds to instance method +to_str+,
|
706
720
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -715,10 +729,6 @@ module JSON
|
|
715
729
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
716
730
|
# It will be called recursively with each result (depth-first order).
|
717
731
|
# See details below.
|
718
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
719
|
-
# like from your own database server or clients under your control, it could
|
720
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
721
|
-
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
722
732
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
723
733
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
724
734
|
# The default options can be changed via method JSON.load_default_options=.
|
@@ -825,7 +835,7 @@ module JSON
|
|
825
835
|
# #<Admin:0x00000000064c41f8
|
826
836
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
827
837
|
#
|
828
|
-
# source://json
|
838
|
+
# source://json//lib/json/common.rb#826
|
829
839
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
830
840
|
|
831
841
|
# :call-seq:
|
@@ -836,7 +846,7 @@ module JSON
|
|
836
846
|
#
|
837
847
|
# See method #parse.
|
838
848
|
#
|
839
|
-
# source://json
|
849
|
+
# source://json//lib/json/common.rb#373
|
840
850
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
841
851
|
|
842
852
|
# :call-seq:
|
@@ -847,12 +857,9 @@ module JSON
|
|
847
857
|
#
|
848
858
|
# See method #parse!
|
849
859
|
#
|
850
|
-
# source://json
|
860
|
+
# source://json//lib/json/common.rb#384
|
851
861
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
852
862
|
|
853
|
-
# source://json/lib/json/common.rb#816
|
854
|
-
def merge_dump_options(opts, strict: T.unsafe(nil)); end
|
855
|
-
|
856
863
|
# :call-seq:
|
857
864
|
# JSON.parse(source, opts) -> object
|
858
865
|
#
|
@@ -901,7 +908,7 @@ module JSON
|
|
901
908
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
902
909
|
# JSON.parse('')
|
903
910
|
#
|
904
|
-
# source://json
|
911
|
+
# source://json//lib/json/common.rb#336
|
905
912
|
def parse(source, opts = T.unsafe(nil)); end
|
906
913
|
|
907
914
|
# :call-seq:
|
@@ -916,7 +923,7 @@ module JSON
|
|
916
923
|
# which disables checking for nesting depth.
|
917
924
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
918
925
|
#
|
919
|
-
# source://json
|
926
|
+
# source://json//lib/json/common.rb#358
|
920
927
|
def parse!(source, opts = T.unsafe(nil)); end
|
921
928
|
|
922
929
|
# :call-seq:
|
@@ -949,35 +956,31 @@ module JSON
|
|
949
956
|
# }
|
950
957
|
# }
|
951
958
|
#
|
952
|
-
# source://json
|
959
|
+
# source://json//lib/json/common.rb#492
|
953
960
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
954
961
|
|
955
|
-
#
|
956
|
-
|
957
|
-
#
|
958
|
-
# source://json/lib/json/common.rb#358
|
959
|
-
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
960
|
-
|
961
|
-
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
962
|
-
#
|
963
|
-
# source://json/lib/json/common.rb#717
|
964
|
-
def recurse_proc(result, &proc); end
|
962
|
+
# source://json//lib/json/common.rb#947
|
963
|
+
def pretty_unparse(*_arg0, **_arg1, &_arg2); end
|
965
964
|
|
966
|
-
# source://json
|
967
|
-
def restore(
|
965
|
+
# source://json//lib/json/common.rb#957
|
966
|
+
def restore(*_arg0, **_arg1, &_arg2); end
|
968
967
|
|
969
968
|
# :stopdoc:
|
970
|
-
#
|
971
|
-
#
|
969
|
+
# All these were meant to be deprecated circa 2009, but were just set as undocumented
|
970
|
+
# so usage still exist in the wild.
|
972
971
|
#
|
973
|
-
# source://json
|
974
|
-
def unparse(
|
972
|
+
# source://json//lib/json/common.rb#927
|
973
|
+
def unparse(*_arg0, **_arg1, &_arg2); end
|
975
974
|
|
976
975
|
# :call-seq:
|
977
976
|
# JSON.unsafe_load(source, proc = nil, options = {}) -> object
|
978
977
|
#
|
979
978
|
# Returns the Ruby objects created by parsing the given +source+.
|
980
979
|
#
|
980
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
981
|
+
# like from your own database server or clients under your control, it could
|
982
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
983
|
+
#
|
981
984
|
# - Argument +source+ must be, or be convertible to, a \String:
|
982
985
|
# - If +source+ responds to instance method +to_str+,
|
983
986
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -992,9 +995,6 @@ module JSON
|
|
992
995
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
993
996
|
# It will be called recursively with each result (depth-first order).
|
994
997
|
# See details below.
|
995
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
996
|
-
# like from your own database server or clients under your control, it could
|
997
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
998
998
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
999
999
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
1000
1000
|
# The default options can be changed via method JSON.unsafe_load_default_options=.
|
@@ -1101,7 +1101,7 @@ module JSON
|
|
1101
1101
|
# #<Admin:0x00000000064c41f8
|
1102
1102
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1103
1103
|
#
|
1104
|
-
# source://json
|
1104
|
+
# source://json//lib/json/common.rb#666
|
1105
1105
|
def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1106
1106
|
|
1107
1107
|
class << self
|
@@ -1117,34 +1117,28 @@ module JSON
|
|
1117
1117
|
# ruby = [0, 1, nil]
|
1118
1118
|
# JSON[ruby] # => '[0,1,null]'
|
1119
1119
|
#
|
1120
|
-
# source://json
|
1120
|
+
# source://json//lib/json/common.rb#126
|
1121
1121
|
def [](object, opts = T.unsafe(nil)); end
|
1122
1122
|
|
1123
|
-
# source://json/lib/json/common.rb#80
|
1124
|
-
def create_fast_state; end
|
1125
|
-
|
1126
1123
|
# Returns the current create identifier.
|
1127
1124
|
# See also JSON.create_id=.
|
1128
1125
|
#
|
1129
|
-
# source://json
|
1126
|
+
# source://json//lib/json/common.rb#219
|
1130
1127
|
def create_id; end
|
1131
1128
|
|
1132
1129
|
# Sets create identifier, which is used to decide if the _json_create_
|
1133
1130
|
# hook of a class should be called; initial value is +json_class+:
|
1134
1131
|
# JSON.create_id # => 'json_class'
|
1135
1132
|
#
|
1136
|
-
# source://json
|
1133
|
+
# source://json//lib/json/common.rb#213
|
1137
1134
|
def create_id=(new_value); end
|
1138
1135
|
|
1139
|
-
# source://json/lib/json/common.rb#90
|
1140
|
-
def create_pretty_state; end
|
1141
|
-
|
1142
1136
|
# Return the constant located at _path_. The format of _path_ has to be
|
1143
1137
|
# either ::A::B::C or A::B::C. In any case, A has to be located at the top
|
1144
1138
|
# level (absolute namespace path?). If there doesn't exist a constant at
|
1145
1139
|
# the given path, an ArgumentError is raised.
|
1146
1140
|
#
|
1147
|
-
# source://json
|
1141
|
+
# source://json//lib/json/common.rb#153
|
1148
1142
|
def deep_const_get(path); end
|
1149
1143
|
|
1150
1144
|
# :call-seq:
|
@@ -1175,25 +1169,9 @@ module JSON
|
|
1175
1169
|
# Output:
|
1176
1170
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
1177
1171
|
#
|
1178
|
-
# source://json
|
1172
|
+
# source://json//lib/json/common.rb#892
|
1179
1173
|
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
|
1180
1174
|
|
1181
|
-
# Sets or returns the default options for the JSON.dump method.
|
1182
|
-
# Initially:
|
1183
|
-
# opts = JSON.dump_default_options
|
1184
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true}
|
1185
|
-
#
|
1186
|
-
# source://json/lib/json/common.rb#738
|
1187
|
-
def dump_default_options; end
|
1188
|
-
|
1189
|
-
# Sets or returns the default options for the JSON.dump method.
|
1190
|
-
# Initially:
|
1191
|
-
# opts = JSON.dump_default_options
|
1192
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true}
|
1193
|
-
#
|
1194
|
-
# source://json/lib/json/common.rb#738
|
1195
|
-
def dump_default_options=(_arg0); end
|
1196
|
-
|
1197
1175
|
# :call-seq:
|
1198
1176
|
# JSON.fast_generate(obj, opts) -> new_string
|
1199
1177
|
#
|
@@ -1208,14 +1186,11 @@ module JSON
|
|
1208
1186
|
# # Raises SystemStackError (stack level too deep):
|
1209
1187
|
# JSON.fast_generate(a)
|
1210
1188
|
#
|
1211
|
-
# source://json
|
1189
|
+
# source://json//lib/json/common.rb#445
|
1212
1190
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
1213
1191
|
|
1214
|
-
#
|
1215
|
-
|
1216
|
-
#
|
1217
|
-
# source://json/lib/json/common.rb#313
|
1218
|
-
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
1192
|
+
# source://json//lib/json/common.rb#937
|
1193
|
+
def fast_unparse(*_arg0, **_arg1, &_arg2); end
|
1219
1194
|
|
1220
1195
|
# :call-seq:
|
1221
1196
|
# JSON.generate(obj, opts = nil) -> new_string
|
@@ -1253,29 +1228,34 @@ module JSON
|
|
1253
1228
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
1254
1229
|
# JSON.generate(a)
|
1255
1230
|
#
|
1256
|
-
# source://json
|
1231
|
+
# source://json//lib/json/common.rb#424
|
1257
1232
|
def generate(obj, opts = T.unsafe(nil)); end
|
1258
1233
|
|
1259
1234
|
# Returns the JSON generator module that is used by JSON.
|
1260
1235
|
#
|
1261
|
-
# source://json
|
1236
|
+
# source://json//lib/json/common.rb#181
|
1262
1237
|
def generator; end
|
1263
1238
|
|
1264
1239
|
# Set the module _generator_ to be used by JSON.
|
1265
1240
|
#
|
1266
|
-
# source://json
|
1241
|
+
# source://json//lib/json/common.rb#160
|
1267
1242
|
def generator=(generator); end
|
1268
1243
|
|
1269
|
-
# Encodes string using String.encode.
|
1270
|
-
#
|
1271
|
-
# source://json/lib/json/common.rb#812
|
1272
|
-
def iconv(to, from, string); end
|
1273
|
-
|
1274
1244
|
# :call-seq:
|
1275
1245
|
# JSON.load(source, proc = nil, options = {}) -> object
|
1276
1246
|
#
|
1277
1247
|
# Returns the Ruby objects created by parsing the given +source+.
|
1278
1248
|
#
|
1249
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
1250
|
+
# like from your own database server or clients under your control, it could
|
1251
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1252
|
+
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
1253
|
+
#
|
1254
|
+
# Since JSON version 2.8.0, `load` emits a deprecation warning when a
|
1255
|
+
# non native type is deserialized, without `create_additions` being explicitly
|
1256
|
+
# enabled, and in JSON version 3.0, `load` will have `create_additions` disabled
|
1257
|
+
# by default.
|
1258
|
+
#
|
1279
1259
|
# - Argument +source+ must be, or be convertible to, a \String:
|
1280
1260
|
# - If +source+ responds to instance method +to_str+,
|
1281
1261
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -1290,10 +1270,6 @@ module JSON
|
|
1290
1270
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
1291
1271
|
# It will be called recursively with each result (depth-first order).
|
1292
1272
|
# See details below.
|
1293
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
1294
|
-
# like from your own database server or clients under your control, it could
|
1295
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1296
|
-
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
1297
1273
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
1298
1274
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
1299
1275
|
# The default options can be changed via method JSON.load_default_options=.
|
@@ -1400,25 +1376,9 @@ module JSON
|
|
1400
1376
|
# #<Admin:0x00000000064c41f8
|
1401
1377
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1402
1378
|
#
|
1403
|
-
# source://json
|
1379
|
+
# source://json//lib/json/common.rb#826
|
1404
1380
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1405
1381
|
|
1406
|
-
# Sets or returns default options for the JSON.load method.
|
1407
|
-
# Initially:
|
1408
|
-
# opts = JSON.load_default_options
|
1409
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1410
|
-
#
|
1411
|
-
# source://json/lib/json/common.rb#402
|
1412
|
-
def load_default_options; end
|
1413
|
-
|
1414
|
-
# Sets or returns default options for the JSON.load method.
|
1415
|
-
# Initially:
|
1416
|
-
# opts = JSON.load_default_options
|
1417
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1418
|
-
#
|
1419
|
-
# source://json/lib/json/common.rb#402
|
1420
|
-
def load_default_options=(_arg0); end
|
1421
|
-
|
1422
1382
|
# :call-seq:
|
1423
1383
|
# JSON.load_file(path, opts={}) -> object
|
1424
1384
|
#
|
@@ -1427,7 +1387,7 @@ module JSON
|
|
1427
1387
|
#
|
1428
1388
|
# See method #parse.
|
1429
1389
|
#
|
1430
|
-
# source://json
|
1390
|
+
# source://json//lib/json/common.rb#373
|
1431
1391
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
1432
1392
|
|
1433
1393
|
# :call-seq:
|
@@ -1438,7 +1398,7 @@ module JSON
|
|
1438
1398
|
#
|
1439
1399
|
# See method #parse!
|
1440
1400
|
#
|
1441
|
-
# source://json
|
1401
|
+
# source://json//lib/json/common.rb#384
|
1442
1402
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
1443
1403
|
|
1444
1404
|
# :call-seq:
|
@@ -1489,7 +1449,7 @@ module JSON
|
|
1489
1449
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
1490
1450
|
# JSON.parse('')
|
1491
1451
|
#
|
1492
|
-
# source://json
|
1452
|
+
# source://json//lib/json/common.rb#336
|
1493
1453
|
def parse(source, opts = T.unsafe(nil)); end
|
1494
1454
|
|
1495
1455
|
# :call-seq:
|
@@ -1504,17 +1464,17 @@ module JSON
|
|
1504
1464
|
# which disables checking for nesting depth.
|
1505
1465
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
1506
1466
|
#
|
1507
|
-
# source://json
|
1467
|
+
# source://json//lib/json/common.rb#358
|
1508
1468
|
def parse!(source, opts = T.unsafe(nil)); end
|
1509
1469
|
|
1510
1470
|
# Returns the JSON parser class that is used by JSON.
|
1511
1471
|
#
|
1512
|
-
# source://json
|
1472
|
+
# source://json//lib/json/common.rb#140
|
1513
1473
|
def parser; end
|
1514
1474
|
|
1515
1475
|
# Set the JSON parser class _parser_ to be used by JSON.
|
1516
1476
|
#
|
1517
|
-
# source://json
|
1477
|
+
# source://json//lib/json/common.rb#143
|
1518
1478
|
def parser=(parser); end
|
1519
1479
|
|
1520
1480
|
# :call-seq:
|
@@ -1547,45 +1507,41 @@ module JSON
|
|
1547
1507
|
# }
|
1548
1508
|
# }
|
1549
1509
|
#
|
1550
|
-
# source://json
|
1510
|
+
# source://json//lib/json/common.rb#492
|
1551
1511
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
1552
1512
|
|
1553
|
-
#
|
1554
|
-
|
1555
|
-
#
|
1556
|
-
# source://json/lib/json/common.rb#358
|
1557
|
-
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
1513
|
+
# source://json//lib/json/common.rb#947
|
1514
|
+
def pretty_unparse(*_arg0, **_arg1, &_arg2); end
|
1558
1515
|
|
1559
|
-
#
|
1560
|
-
|
1561
|
-
# source://json/lib/json/common.rb#717
|
1562
|
-
def recurse_proc(result, &proc); end
|
1563
|
-
|
1564
|
-
# source://json/lib/json/common.rb#691
|
1565
|
-
def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1516
|
+
# source://json//lib/json/common.rb#957
|
1517
|
+
def restore(*_arg0, **_arg1, &_arg2); end
|
1566
1518
|
|
1567
1519
|
# Sets or Returns the JSON generator state class that is used by JSON.
|
1568
1520
|
#
|
1569
|
-
# source://json
|
1521
|
+
# source://json//lib/json/common.rb#184
|
1570
1522
|
def state; end
|
1571
1523
|
|
1572
1524
|
# Sets or Returns the JSON generator state class that is used by JSON.
|
1573
1525
|
#
|
1574
|
-
# source://json
|
1526
|
+
# source://json//lib/json/common.rb#184
|
1575
1527
|
def state=(_arg0); end
|
1576
1528
|
|
1577
1529
|
# :stopdoc:
|
1578
|
-
#
|
1579
|
-
#
|
1530
|
+
# All these were meant to be deprecated circa 2009, but were just set as undocumented
|
1531
|
+
# so usage still exist in the wild.
|
1580
1532
|
#
|
1581
|
-
# source://json
|
1582
|
-
def unparse(
|
1533
|
+
# source://json//lib/json/common.rb#927
|
1534
|
+
def unparse(*_arg0, **_arg1, &_arg2); end
|
1583
1535
|
|
1584
1536
|
# :call-seq:
|
1585
1537
|
# JSON.unsafe_load(source, proc = nil, options = {}) -> object
|
1586
1538
|
#
|
1587
1539
|
# Returns the Ruby objects created by parsing the given +source+.
|
1588
1540
|
#
|
1541
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
1542
|
+
# like from your own database server or clients under your control, it could
|
1543
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1544
|
+
#
|
1589
1545
|
# - Argument +source+ must be, or be convertible to, a \String:
|
1590
1546
|
# - If +source+ responds to instance method +to_str+,
|
1591
1547
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -1600,9 +1556,6 @@ module JSON
|
|
1600
1556
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
1601
1557
|
# It will be called recursively with each result (depth-first order).
|
1602
1558
|
# See details below.
|
1603
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
1604
|
-
# like from your own database server or clients under your control, it could
|
1605
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1606
1559
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
1607
1560
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
1608
1561
|
# The default options can be changed via method JSON.unsafe_load_default_options=.
|
@@ -1709,33 +1662,107 @@ module JSON
|
|
1709
1662
|
# #<Admin:0x00000000064c41f8
|
1710
1663
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1711
1664
|
#
|
1712
|
-
# source://json
|
1665
|
+
# source://json//lib/json/common.rb#666
|
1713
1666
|
def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1714
1667
|
|
1715
|
-
# Sets or returns default options for the JSON.unsafe_load method.
|
1716
|
-
# Initially:
|
1717
|
-
# opts = JSON.load_default_options
|
1718
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1719
|
-
#
|
1720
|
-
# source://json/lib/json/common.rb#388
|
1721
|
-
def unsafe_load_default_options; end
|
1722
|
-
|
1723
|
-
# Sets or returns default options for the JSON.unsafe_load method.
|
1724
|
-
# Initially:
|
1725
|
-
# opts = JSON.load_default_options
|
1726
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1727
|
-
#
|
1728
|
-
# source://json/lib/json/common.rb#388
|
1729
|
-
def unsafe_load_default_options=(_arg0); end
|
1730
|
-
|
1731
1668
|
private
|
1732
1669
|
|
1733
|
-
# source://json
|
1734
|
-
def
|
1670
|
+
# source://json//lib/json/common.rb#970
|
1671
|
+
def const_missing(const_name); end
|
1672
|
+
|
1673
|
+
# source://json//lib/json/common.rb#188
|
1674
|
+
def deprecated_singleton_attr_accessor(*attrs); end
|
1735
1675
|
end
|
1736
1676
|
end
|
1737
1677
|
|
1738
|
-
#
|
1678
|
+
# JSON::Coder holds a parser and generator configuration.
|
1679
|
+
#
|
1680
|
+
# module MyApp
|
1681
|
+
# JSONC_CODER = JSON::Coder.new(
|
1682
|
+
# allow_trailing_comma: true
|
1683
|
+
# )
|
1684
|
+
# end
|
1685
|
+
#
|
1686
|
+
# MyApp::JSONC_CODER.load(document)
|
1687
|
+
#
|
1688
|
+
# source://json//lib/json/common.rb#996
|
1689
|
+
class JSON::Coder
|
1690
|
+
# :call-seq:
|
1691
|
+
# JSON.new(options = nil, &block)
|
1692
|
+
#
|
1693
|
+
# Argument +options+, if given, contains a \Hash of options for both parsing and generating.
|
1694
|
+
# See {Parsing Options}[#module-JSON-label-Parsing+Options], and {Generating Options}[#module-JSON-label-Generating+Options].
|
1695
|
+
#
|
1696
|
+
# For generation, the <tt>strict: true</tt> option is always set. When a Ruby object with no native \JSON counterpart is
|
1697
|
+
# encoutered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native
|
1698
|
+
# \JSON counterpart:
|
1699
|
+
#
|
1700
|
+
# module MyApp
|
1701
|
+
# API_JSON_CODER = JSON::Coder.new do |object|
|
1702
|
+
# case object
|
1703
|
+
# when Time
|
1704
|
+
# object.iso8601(3)
|
1705
|
+
# else
|
1706
|
+
# object # Unknown type, will raise
|
1707
|
+
# end
|
1708
|
+
# end
|
1709
|
+
# end
|
1710
|
+
#
|
1711
|
+
# puts MyApp::API_JSON_CODER.dump(Time.now.utc) # => "2025-01-21T08:41:44.286Z"
|
1712
|
+
#
|
1713
|
+
# @return [Coder] a new instance of Coder
|
1714
|
+
#
|
1715
|
+
# source://json//lib/json/common.rb#1020
|
1716
|
+
def initialize(options = T.unsafe(nil), &as_json); end
|
1717
|
+
|
1718
|
+
# call-seq:
|
1719
|
+
# dump(object) -> String
|
1720
|
+
# dump(object, io) -> io
|
1721
|
+
#
|
1722
|
+
# Serialize the given object into a \JSON document.
|
1723
|
+
#
|
1724
|
+
# source://json//lib/json/common.rb#1038
|
1725
|
+
def dump(object, io = T.unsafe(nil)); end
|
1726
|
+
|
1727
|
+
# call-seq:
|
1728
|
+
# dump(object) -> String
|
1729
|
+
# dump(object, io) -> io
|
1730
|
+
#
|
1731
|
+
# Serialize the given object into a \JSON document.
|
1732
|
+
#
|
1733
|
+
# source://json//lib/json/common.rb#1038
|
1734
|
+
def generate(object, io = T.unsafe(nil)); end
|
1735
|
+
|
1736
|
+
# call-seq:
|
1737
|
+
# load(string) -> Object
|
1738
|
+
#
|
1739
|
+
# Parse the given \JSON document and return an equivalent Ruby object.
|
1740
|
+
#
|
1741
|
+
# source://json//lib/json/common.rb#1047
|
1742
|
+
def load(source); end
|
1743
|
+
|
1744
|
+
# call-seq:
|
1745
|
+
# load(path) -> Object
|
1746
|
+
#
|
1747
|
+
# Parse the given \JSON document and return an equivalent Ruby object.
|
1748
|
+
#
|
1749
|
+
# source://json//lib/json/common.rb#1056
|
1750
|
+
def load_file(path); end
|
1751
|
+
|
1752
|
+
# call-seq:
|
1753
|
+
# load(string) -> Object
|
1754
|
+
#
|
1755
|
+
# Parse the given \JSON document and return an equivalent Ruby object.
|
1756
|
+
#
|
1757
|
+
# source://json//lib/json/common.rb#1047
|
1758
|
+
def parse(source); end
|
1759
|
+
end
|
1760
|
+
|
1761
|
+
module JSON::Ext::Generator::GeneratorMethods::String
|
1762
|
+
mixes_in_class_methods ::JSON::Ext::Generator::GeneratorMethods::String::Extend
|
1763
|
+
end
|
1764
|
+
|
1765
|
+
# source://json//lib/json/ext/generator/state.rb#6
|
1739
1766
|
class JSON::Ext::Generator::State
|
1740
1767
|
# call-seq: new(opts = {})
|
1741
1768
|
#
|
@@ -1758,21 +1785,21 @@ class JSON::Ext::Generator::State
|
|
1758
1785
|
#
|
1759
1786
|
# @return [State] a new instance of State
|
1760
1787
|
#
|
1761
|
-
# source://json
|
1788
|
+
# source://json//lib/json/ext/generator/state.rb#25
|
1762
1789
|
def initialize(opts = T.unsafe(nil)); end
|
1763
1790
|
|
1764
1791
|
# call-seq: [](name)
|
1765
1792
|
#
|
1766
1793
|
# Returns the value returned by method +name+.
|
1767
1794
|
#
|
1768
|
-
# source://json
|
1795
|
+
# source://json//lib/json/ext/generator/state.rb#84
|
1769
1796
|
def [](name); end
|
1770
1797
|
|
1771
1798
|
# call-seq: []=(name, value)
|
1772
1799
|
#
|
1773
1800
|
# Sets the attribute name to value.
|
1774
1801
|
#
|
1775
|
-
# source://json
|
1802
|
+
# source://json//lib/json/ext/generator/state.rb#96
|
1776
1803
|
def []=(name, value); end
|
1777
1804
|
|
1778
1805
|
# call-seq: configure(opts)
|
@@ -1780,7 +1807,7 @@ class JSON::Ext::Generator::State
|
|
1780
1807
|
# Configure this State instance with the Hash _opts_, and return
|
1781
1808
|
# itself.
|
1782
1809
|
#
|
1783
|
-
# source://json
|
1810
|
+
# source://json//lib/json/ext/generator/state.rb#35
|
1784
1811
|
def configure(opts); end
|
1785
1812
|
|
1786
1813
|
# call-seq: configure(opts)
|
@@ -1788,7 +1815,7 @@ class JSON::Ext::Generator::State
|
|
1788
1815
|
# Configure this State instance with the Hash _opts_, and return
|
1789
1816
|
# itself.
|
1790
1817
|
#
|
1791
|
-
# source://json
|
1818
|
+
# source://json//lib/json/ext/generator/state.rb#35
|
1792
1819
|
def merge(opts); end
|
1793
1820
|
|
1794
1821
|
# call-seq: to_h
|
@@ -1796,7 +1823,7 @@ class JSON::Ext::Generator::State
|
|
1796
1823
|
# Returns the configuration instance variables as a hash, that can be
|
1797
1824
|
# passed to the configure method.
|
1798
1825
|
#
|
1799
|
-
# source://json
|
1826
|
+
# source://json//lib/json/ext/generator/state.rb#54
|
1800
1827
|
def to_h; end
|
1801
1828
|
|
1802
1829
|
# call-seq: to_h
|
@@ -1804,76 +1831,179 @@ class JSON::Ext::Generator::State
|
|
1804
1831
|
# Returns the configuration instance variables as a hash, that can be
|
1805
1832
|
# passed to the configure method.
|
1806
1833
|
#
|
1807
|
-
# source://json
|
1834
|
+
# source://json//lib/json/ext/generator/state.rb#54
|
1808
1835
|
def to_hash; end
|
1809
1836
|
end
|
1810
1837
|
|
1811
|
-
# source://json
|
1838
|
+
# source://json//lib/json/ext.rb#9
|
1839
|
+
class JSON::Ext::Parser
|
1840
|
+
# @return [Parser] a new instance of Parser
|
1841
|
+
#
|
1842
|
+
# source://json//lib/json/ext.rb#17
|
1843
|
+
def initialize(source, opts = T.unsafe(nil)); end
|
1844
|
+
|
1845
|
+
# source://json//lib/json/ext.rb#26
|
1846
|
+
def parse; end
|
1847
|
+
|
1848
|
+
# source://json//lib/json/ext.rb#22
|
1849
|
+
def source; end
|
1850
|
+
end
|
1851
|
+
|
1852
|
+
# source://json//lib/json/ext.rb#32
|
1853
|
+
JSON::Ext::Parser::Config = JSON::Ext::ParserConfig
|
1854
|
+
|
1855
|
+
# Fragment of JSON document that is to be included as is:
|
1856
|
+
# fragment = JSON::Fragment.new("[1, 2, 3]")
|
1857
|
+
# JSON.generate({ count: 3, items: fragments })
|
1858
|
+
#
|
1859
|
+
# This allows to easily assemble multiple JSON fragments that have
|
1860
|
+
# been persisted somewhere without having to parse them nor resorting
|
1861
|
+
# to string interpolation.
|
1862
|
+
#
|
1863
|
+
# Note: no validation is performed on the provided string. It is the
|
1864
|
+
# responsability of the caller to ensure the string contains valid JSON.
|
1865
|
+
#
|
1866
|
+
# source://json//lib/json/common.rb#272
|
1867
|
+
class JSON::Fragment < ::Struct
|
1868
|
+
# @return [Fragment] a new instance of Fragment
|
1869
|
+
#
|
1870
|
+
# source://json//lib/json/common.rb#273
|
1871
|
+
def initialize(json); end
|
1872
|
+
|
1873
|
+
# Returns the value of attribute json
|
1874
|
+
#
|
1875
|
+
# @return [Object] the current value of json
|
1876
|
+
def json; end
|
1877
|
+
|
1878
|
+
# Sets the attribute json
|
1879
|
+
#
|
1880
|
+
# @param value [Object] the value to set the attribute json to.
|
1881
|
+
# @return [Object] the newly set value
|
1882
|
+
def json=(_); end
|
1883
|
+
|
1884
|
+
# source://json//lib/json/common.rb#281
|
1885
|
+
def to_json(state = T.unsafe(nil), *_arg1); end
|
1886
|
+
|
1887
|
+
class << self
|
1888
|
+
def [](*_arg0); end
|
1889
|
+
def inspect; end
|
1890
|
+
def keyword_init?; end
|
1891
|
+
def members; end
|
1892
|
+
def new(*_arg0); end
|
1893
|
+
end
|
1894
|
+
end
|
1895
|
+
|
1896
|
+
# This exception is raised if a generator or unparser error occurs.
|
1897
|
+
#
|
1898
|
+
# source://json//lib/json/common.rb#242
|
1899
|
+
class JSON::GeneratorError < ::JSON::JSONError
|
1900
|
+
# @return [GeneratorError] a new instance of GeneratorError
|
1901
|
+
#
|
1902
|
+
# source://json//lib/json/common.rb#245
|
1903
|
+
def initialize(message, invalid_object = T.unsafe(nil)); end
|
1904
|
+
|
1905
|
+
# source://json//lib/json/common.rb#250
|
1906
|
+
def detailed_message(*_arg0, **_arg1, &_arg2); end
|
1907
|
+
|
1908
|
+
# Returns the value of attribute invalid_object.
|
1909
|
+
#
|
1910
|
+
# source://json//lib/json/common.rb#243
|
1911
|
+
def invalid_object; end
|
1912
|
+
end
|
1913
|
+
|
1914
|
+
# source://json//lib/json/generic_object.rb#9
|
1812
1915
|
class JSON::GenericObject < ::OpenStruct
|
1813
|
-
# source://json
|
1916
|
+
# source://json//lib/json/generic_object.rb#67
|
1814
1917
|
def as_json(*_arg0); end
|
1815
1918
|
|
1816
|
-
# source://json
|
1919
|
+
# source://json//lib/json/generic_object.rb#51
|
1817
1920
|
def to_hash; end
|
1818
1921
|
|
1819
|
-
# source://json
|
1922
|
+
# source://json//lib/json/generic_object.rb#71
|
1820
1923
|
def to_json(*a); end
|
1821
1924
|
|
1822
|
-
# source://json
|
1925
|
+
# source://json//lib/json/generic_object.rb#63
|
1823
1926
|
def |(other); end
|
1824
1927
|
|
1825
1928
|
class << self
|
1826
|
-
# source://json
|
1929
|
+
# source://json//lib/json/generic_object.rb#45
|
1827
1930
|
def dump(obj, *args); end
|
1828
1931
|
|
1829
|
-
# source://json
|
1932
|
+
# source://json//lib/json/generic_object.rb#25
|
1830
1933
|
def from_hash(object); end
|
1831
1934
|
|
1832
1935
|
# Sets the attribute json_creatable
|
1833
1936
|
#
|
1834
1937
|
# @param value the value to set the attribute json_creatable to.
|
1835
1938
|
#
|
1836
|
-
# source://json
|
1939
|
+
# source://json//lib/json/generic_object.rb#17
|
1837
1940
|
def json_creatable=(_arg0); end
|
1838
1941
|
|
1839
1942
|
# @return [Boolean]
|
1840
1943
|
#
|
1841
|
-
# source://json
|
1944
|
+
# source://json//lib/json/generic_object.rb#13
|
1842
1945
|
def json_creatable?; end
|
1843
1946
|
|
1844
|
-
# source://json
|
1947
|
+
# source://json//lib/json/generic_object.rb#19
|
1845
1948
|
def json_create(data); end
|
1846
1949
|
|
1847
|
-
# source://json
|
1950
|
+
# source://json//lib/json/generic_object.rb#40
|
1848
1951
|
def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1849
1952
|
end
|
1850
1953
|
end
|
1851
1954
|
|
1852
|
-
#
|
1955
|
+
# source://json//lib/json/common.rb#341
|
1956
|
+
JSON::PARSE_L_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1957
|
+
|
1958
|
+
# source://json//lib/json/common.rb#454
|
1959
|
+
JSON::PRETTY_GENERATE_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1960
|
+
|
1961
|
+
# source://json//lib/json/common.rb#146
|
1962
|
+
JSON::Parser = JSON::Ext::Parser
|
1963
|
+
|
1964
|
+
# This exception is raised if a parser error occurs.
|
1853
1965
|
#
|
1854
|
-
# source://json
|
1855
|
-
class JSON::
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
end
|
1966
|
+
# source://json//lib/json/common.rb#233
|
1967
|
+
class JSON::ParserError < ::JSON::JSONError
|
1968
|
+
# Returns the value of attribute column.
|
1969
|
+
#
|
1970
|
+
# source://json//lib/json/common.rb#234
|
1971
|
+
def column; end
|
1972
|
+
|
1973
|
+
# Returns the value of attribute line.
|
1974
|
+
#
|
1975
|
+
# source://json//lib/json/common.rb#234
|
1976
|
+
def line; end
|
1860
1977
|
end
|
1861
1978
|
|
1862
|
-
# source://json
|
1863
|
-
JSON::
|
1979
|
+
# source://json//lib/json/common.rb#8
|
1980
|
+
module JSON::ParserOptions
|
1981
|
+
class << self
|
1982
|
+
# source://json//lib/json/common.rb#10
|
1983
|
+
def prepare(opts); end
|
1864
1984
|
|
1865
|
-
|
1866
|
-
JSON::Parser = JSON::Ext::Parser
|
1985
|
+
private
|
1867
1986
|
|
1868
|
-
# source://json
|
1869
|
-
|
1987
|
+
# source://json//lib/json/common.rb#40
|
1988
|
+
def array_class_proc(array_class, on_load); end
|
1870
1989
|
|
1871
|
-
#
|
1872
|
-
#
|
1873
|
-
# source://json
|
1874
|
-
|
1990
|
+
# TODO: exctract :create_additions support to another gem for version 3.0
|
1991
|
+
#
|
1992
|
+
# source://json//lib/json/common.rb#52
|
1993
|
+
def create_additions_proc(opts); end
|
1994
|
+
|
1995
|
+
# source://json//lib/json/common.rb#91
|
1996
|
+
def create_additions_warning; end
|
1997
|
+
|
1998
|
+
# source://json//lib/json/common.rb#29
|
1999
|
+
def object_class_proc(object_class, on_load); end
|
2000
|
+
end
|
2001
|
+
end
|
2002
|
+
|
2003
|
+
# source://json//lib/json/common.rb#175
|
2004
|
+
JSON::State = JSON::Ext::Generator::State
|
1875
2005
|
|
1876
|
-
# source://json
|
2006
|
+
# source://json//lib/json/common.rb#1062
|
1877
2007
|
module Kernel
|
1878
2008
|
private
|
1879
2009
|
|
@@ -1884,18 +2014,38 @@ module Kernel
|
|
1884
2014
|
# The _opts_ argument is passed through to generate/parse respectively. See
|
1885
2015
|
# generate and parse for their documentation.
|
1886
2016
|
#
|
1887
|
-
# source://json
|
1888
|
-
def JSON(object,
|
2017
|
+
# source://json//lib/json/common.rb#1101
|
2018
|
+
def JSON(object, opts = T.unsafe(nil)); end
|
1889
2019
|
|
1890
2020
|
# Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in
|
1891
2021
|
# one line.
|
1892
2022
|
#
|
1893
|
-
# source://json
|
2023
|
+
# source://json//lib/json/common.rb#1067
|
1894
2024
|
def j(*objs); end
|
1895
2025
|
|
1896
2026
|
# Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
|
1897
2027
|
# indentation and over many lines.
|
1898
2028
|
#
|
1899
|
-
# source://json
|
2029
|
+
# source://json//lib/json/common.rb#1082
|
1900
2030
|
def jj(*objs); end
|
1901
2031
|
end
|
2032
|
+
|
2033
|
+
class NilClass
|
2034
|
+
include ::JSON::Ext::Generator::GeneratorMethods::NilClass
|
2035
|
+
end
|
2036
|
+
|
2037
|
+
class Object < ::BasicObject
|
2038
|
+
include ::Kernel
|
2039
|
+
include ::PP::ObjectMixin
|
2040
|
+
include ::JSON::Ext::Generator::GeneratorMethods::Object
|
2041
|
+
end
|
2042
|
+
|
2043
|
+
class String
|
2044
|
+
include ::Comparable
|
2045
|
+
include ::JSON::Ext::Generator::GeneratorMethods::String
|
2046
|
+
extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend
|
2047
|
+
end
|
2048
|
+
|
2049
|
+
class TrueClass
|
2050
|
+
include ::JSON::Ext::Generator::GeneratorMethods::TrueClass
|
2051
|
+
end
|