public class org.apache.cassandra.cql3.Json
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.cql3.Json
super_class: java.lang.Object
{
public static final org.codehaus.jackson.map.ObjectMapper JSON_OBJECT_MAPPER;
descriptor: Lorg/codehaus/jackson/map/ObjectMapper;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final org.apache.cassandra.cql3.ColumnIdentifier JSON_COLUMN_ID;
descriptor: Lorg/apache/cassandra/cql3/ColumnIdentifier;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: new org.codehaus.jackson.map.ObjectMapper
dup
invokespecial org.codehaus.jackson.map.ObjectMapper.<init>:()V
putstatic org.apache.cassandra.cql3.Json.JSON_OBJECT_MAPPER:Lorg/codehaus/jackson/map/ObjectMapper;
1: new org.apache.cassandra.cql3.ColumnIdentifier
dup
ldc "[json]"
iconst_1
invokespecial org.apache.cassandra.cql3.ColumnIdentifier.<init>:(Ljava/lang/String;Z)V
putstatic org.apache.cassandra.cql3.Json.JSON_COLUMN_ID:Lorg/apache/cassandra/cql3/ColumnIdentifier;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/cql3/Json;
public static java.lang.String quoteAsJsonString(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: new java.lang.String
dup
invokestatic org.codehaus.jackson.io.JsonStringEncoder.getInstance:()Lorg/codehaus/jackson/io/JsonStringEncoder;
aload 0
invokevirtual org.codehaus.jackson.io.JsonStringEncoder.quoteAsString:(Ljava/lang/String;)[C
invokespecial java.lang.String.<init>:([C)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 s Ljava/lang/String;
MethodParameters:
Name Flags
s
public static java.lang.Object decodeJson(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: getstatic org.apache.cassandra.cql3.Json.JSON_OBJECT_MAPPER:Lorg/codehaus/jackson/map/ObjectMapper;
aload 0
ldc Ljava/lang/Object;
invokevirtual org.codehaus.jackson.map.ObjectMapper.readValue:(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
1: areturn
2: StackMap locals:
StackMap stack: java.io.IOException
astore 1
start local 1 3: new org.apache.cassandra.serializers.MarshalException
dup
new java.lang.StringBuilder
dup
ldc "Error decoding JSON string: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.apache.cassandra.serializers.MarshalException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 json Ljava/lang/String;
3 4 1 exc Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
MethodParameters:
Name Flags
json
public static java.util.Map<org.apache.cassandra.cql3.ColumnIdentifier, org.apache.cassandra.cql3.Term> parseJson(java.lang.String, java.util.Collection<org.apache.cassandra.config.ColumnDefinition>);
descriptor: (Ljava/lang/String;Ljava/util/Collection;)Ljava/util/Map;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=8, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.cql3.Json.JSON_OBJECT_MAPPER:Lorg/codehaus/jackson/map/ObjectMapper;
aload 0
ldc Ljava/util/Map;
invokevirtual org.codehaus.jackson.map.ObjectMapper.readValue:(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
checkcast java.util.Map
astore 2
start local 2 1: aload 2
ifnonnull 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Got null for INSERT JSON values"
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.util.Map
StackMap stack:
aload 2
invokestatic org.apache.cassandra.cql3.Json.handleCaseSensitivity:(Ljava/util/Map;)V
4: new java.util.HashMap
dup
aload 1
invokeinterface java.util.Collection.size:()I
invokespecial java.util.HashMap.<init>:(I)V
astore 3
start local 3 5: aload 1
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 5
goto 17
StackMap locals: java.lang.String java.util.Collection java.util.Map java.util.Map top java.util.Iterator
StackMap stack:
6: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.cql3.ColumnSpecification
astore 4
start local 4 7: aload 2
aload 4
getfield org.apache.cassandra.cql3.ColumnSpecification.name:Lorg/apache/cassandra/cql3/ColumnIdentifier;
invokevirtual org.apache.cassandra.cql3.ColumnIdentifier.toString:()Ljava/lang/String;
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifne 9
8: goto 17
9: StackMap locals: java.lang.String java.util.Collection java.util.Map java.util.Map org.apache.cassandra.cql3.ColumnSpecification java.util.Iterator
StackMap stack:
aload 2
aload 4
getfield org.apache.cassandra.cql3.ColumnSpecification.name:Lorg/apache/cassandra/cql3/ColumnIdentifier;
invokevirtual org.apache.cassandra.cql3.ColumnIdentifier.toString:()Ljava/lang/String;
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
astore 6
start local 6 10: aload 6
ifnonnull 13
11: aload 3
aload 4
getfield org.apache.cassandra.cql3.ColumnSpecification.name:Lorg/apache/cassandra/cql3/ColumnIdentifier;
getstatic org.apache.cassandra.cql3.Constants.NULL_VALUE:Lorg/apache/cassandra/cql3/Term$Terminal;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
12: goto 17
13: StackMap locals: java.lang.Object
StackMap stack:
aload 3
aload 4
getfield org.apache.cassandra.cql3.ColumnSpecification.name:Lorg/apache/cassandra/cql3/ColumnIdentifier;
aload 4
getfield org.apache.cassandra.cql3.ColumnSpecification.type:Lorg/apache/cassandra/db/marshal/AbstractType;
aload 6
invokevirtual org.apache.cassandra.db.marshal.AbstractType.fromJSONObject:(Ljava/lang/Object;)Lorg/apache/cassandra/cql3/Term;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
14: goto 17
15: StackMap locals:
StackMap stack: org.apache.cassandra.serializers.MarshalException
astore 7
start local 7 16: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Error decoding JSON value for %s: %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 4
getfield org.apache.cassandra.cql3.ColumnSpecification.name:Lorg/apache/cassandra/cql3/ColumnIdentifier;
aastore
dup
iconst_1
aload 7
invokevirtual org.apache.cassandra.serializers.MarshalException.getMessage:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
end local 7 end local 6 end local 4 17: StackMap locals: java.lang.String java.util.Collection java.util.Map java.util.Map top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 6
18: aload 2
invokeinterface java.util.Map.isEmpty:()Z
ifne 22
19: new org.apache.cassandra.exceptions.InvalidRequestException
dup
20: ldc "JSON values map contains unrecognized column: %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 2
invokeinterface java.util.Map.keySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
aastore
21: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
22: StackMap locals: java.lang.String java.util.Collection java.util.Map java.util.Map
StackMap stack:
aload 3
23: areturn
end local 3 end local 2 24: StackMap locals: java.lang.String java.util.Collection
StackMap stack: java.io.IOException
astore 2
start local 2 25: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Could not decode JSON string as a map: %s. (String was: %s)"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 2
invokevirtual java.io.IOException.toString:()Ljava/lang/String;
aastore
dup
iconst_1
aload 0
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
end local 2 26: StackMap locals:
StackMap stack: org.apache.cassandra.serializers.MarshalException
astore 2
start local 2 27: new org.apache.cassandra.exceptions.InvalidRequestException
dup
aload 2
invokevirtual org.apache.cassandra.serializers.MarshalException.getMessage:()Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 jsonString Ljava/lang/String;
0 28 1 expectedReceivers Ljava/util/Collection<Lorg/apache/cassandra/config/ColumnDefinition;>;
1 24 2 valueMap Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;
5 24 3 columnMap Ljava/util/Map<Lorg/apache/cassandra/cql3/ColumnIdentifier;Lorg/apache/cassandra/cql3/Term;>;
7 17 4 spec Lorg/apache/cassandra/cql3/ColumnSpecification;
10 17 6 parsedJsonObject Ljava/lang/Object;
16 17 7 exc Lorg/apache/cassandra/serializers/MarshalException;
25 26 2 exc Ljava/io/IOException;
27 28 2 exc Lorg/apache/cassandra/serializers/MarshalException;
Exception table:
from to target type
13 14 15 Class org.apache.cassandra.serializers.MarshalException
0 23 24 Class java.io.IOException
0 23 26 Class org.apache.cassandra.serializers.MarshalException
Signature: (Ljava/lang/String;Ljava/util/Collection<Lorg/apache/cassandra/config/ColumnDefinition;>;)Ljava/util/Map<Lorg/apache/cassandra/cql3/ColumnIdentifier;Lorg/apache/cassandra/cql3/Term;>;
MethodParameters:
Name Flags
jsonString
expectedReceivers
public static void handleCaseSensitivity(java.util.Map<java.lang.String, java.lang.Object>);
descriptor: (Ljava/util/Map;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: new java.util.ArrayList
dup
aload 0
invokeinterface java.util.Map.keySet:()Ljava/util/Set;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 2
goto 8
StackMap locals: java.util.Map top java.util.Iterator
StackMap stack:
1: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 1
start local 1 2: aload 1
ldc "\""
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 5
aload 1
ldc "\""
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 5
3: aload 0
aload 1
iconst_1
aload 1
invokevirtual java.lang.String.length:()I
iconst_1
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
aload 0
aload 1
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: goto 8
5: StackMap locals: java.util.Map java.lang.String java.util.Iterator
StackMap stack:
aload 1
getstatic java.util.Locale.US:Ljava/util/Locale;
invokevirtual java.lang.String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
astore 3
start local 3 6: aload 1
aload 3
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 8
7: aload 0
aload 3
aload 0
aload 1
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 3 end local 1 8: StackMap locals: java.util.Map top java.util.Iterator
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
9: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 valueMap Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;
2 8 1 mapKey Ljava/lang/String;
6 8 3 lowered Ljava/lang/String;
Signature: (Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;)V
MethodParameters:
Name Flags
valueMap
}
SourceFile: "Json.java"
NestMembers:
org.apache.cassandra.cql3.Json$ColumnValue org.apache.cassandra.cql3.Json$DelayedColumnValue org.apache.cassandra.cql3.Json$Literal org.apache.cassandra.cql3.Json$Marker org.apache.cassandra.cql3.Json$Prepared org.apache.cassandra.cql3.Json$PreparedLiteral org.apache.cassandra.cql3.Json$PreparedMarker org.apache.cassandra.cql3.Json$Raw org.apache.cassandra.cql3.Json$RawDelayedColumnValue
InnerClasses:
private ColumnValue = org.apache.cassandra.cql3.Json$ColumnValue of org.apache.cassandra.cql3.Json
private DelayedColumnValue = org.apache.cassandra.cql3.Json$DelayedColumnValue of org.apache.cassandra.cql3.Json
public Literal = org.apache.cassandra.cql3.Json$Literal of org.apache.cassandra.cql3.Json
public Marker = org.apache.cassandra.cql3.Json$Marker of org.apache.cassandra.cql3.Json
public abstract Prepared = org.apache.cassandra.cql3.Json$Prepared of org.apache.cassandra.cql3.Json
private PreparedLiteral = org.apache.cassandra.cql3.Json$PreparedLiteral of org.apache.cassandra.cql3.Json
private PreparedMarker = org.apache.cassandra.cql3.Json$PreparedMarker of org.apache.cassandra.cql3.Json
public abstract Raw = org.apache.cassandra.cql3.Json$Raw of org.apache.cassandra.cql3.Json
private RawDelayedColumnValue = org.apache.cassandra.cql3.Json$RawDelayedColumnValue of org.apache.cassandra.cql3.Json