.class public Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;
.super Ljava/lang/Object;
.source "JavaBeanSerializer.java"

# interfaces
.implements Lcom/alibaba/fastjson/serializer/ObjectSerializer;


# static fields
.field private static final false_chars:[C

.field private static final true_chars:[C


# instance fields
.field protected final beanType:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class<",
            "*>;"
        }
    .end annotation
.end field

.field protected features:I

.field private final getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

.field protected final sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x4

    .line 37
    new-array v0, v0, [C

    fill-array-data v0, :array_0

    sput-object v0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->true_chars:[C

    const/4 v0, 0x5

    .line 38
    new-array v0, v0, [C

    fill-array-data v0, :array_1

    sput-object v0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->false_chars:[C

    return-void

    nop

    :array_0
    .array-data 2
        0x74s
        0x72s
        0x75s
        0x65s
    .end array-data

    :array_1
    .array-data 2
        0x66s
        0x61s
        0x6cs
        0x73s
        0x65s
    .end array-data
.end method

.method public constructor <init>(Ljava/lang/Class;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class<",
            "*>;)V"
        }
    .end annotation

    const/4 v0, 0x0

    .line 49
    check-cast v0, Ljava/util/Map;

    invoke-direct {p0, p1, v0}, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;-><init>(Ljava/lang/Class;Ljava/util/Map;)V

    return-void
.end method

.method public constructor <init>(Ljava/lang/Class;Ljava/util/Map;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class<",
            "*>;",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .line 66
    invoke-static {p1}, Lcom/alibaba/fastjson/util/TypeUtils;->getSerializeFeatures(Ljava/lang/Class;)I

    move-result v0

    invoke-direct {p0, p1, p2, v0}, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;-><init>(Ljava/lang/Class;Ljava/util/Map;I)V

    return-void
.end method

.method public constructor <init>(Ljava/lang/Class;Ljava/util/Map;I)V
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class<",
            "*>;",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;I)V"
        }
    .end annotation

    .line 69
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 44
    iput v0, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->features:I

    .line 70
    iput p3, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->features:I

    .line 71
    iput-object p1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->beanType:Ljava/lang/Class;

    .line 73
    const-class p3, Lcom/alibaba/fastjson/annotation/JSONType;

    invoke-virtual {p1, p3}, Ljava/lang/Class;->getAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

    move-result-object p3

    check-cast p3, Lcom/alibaba/fastjson/annotation/JSONType;

    if-eqz p3, :cond_0

    .line 76
    invoke-interface {p3}, Lcom/alibaba/fastjson/annotation/JSONType;->serialzeFeatures()[Lcom/alibaba/fastjson/serializer/SerializerFeature;

    move-result-object v1

    invoke-static {v1}, Lcom/alibaba/fastjson/serializer/SerializerFeature;->of([Lcom/alibaba/fastjson/serializer/SerializerFeature;)I

    .line 80
    :cond_0
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 81
    invoke-static {p1, p3, p2, v0}, Lcom/alibaba/fastjson/util/TypeUtils;->computeGetters(Ljava/lang/Class;Lcom/alibaba/fastjson/annotation/JSONType;Ljava/util/Map;Z)Ljava/util/List;

    move-result-object v2

    .line 83
    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/alibaba/fastjson/util/FieldInfo;

    .line 84
    new-instance v4, Lcom/alibaba/fastjson/serializer/FieldSerializer;

    invoke-direct {v4, p1, v3}, Lcom/alibaba/fastjson/serializer/FieldSerializer;-><init>(Ljava/lang/Class;Lcom/alibaba/fastjson/util/FieldInfo;)V

    invoke-interface {v1, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 87
    :cond_1
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v2

    new-array v2, v2, [Lcom/alibaba/fastjson/serializer/FieldSerializer;

    invoke-interface {v1, v2}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [Lcom/alibaba/fastjson/serializer/FieldSerializer;

    iput-object v1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    const/4 v1, 0x0

    if-eqz p3, :cond_2

    .line 93
    invoke-interface {p3}, Lcom/alibaba/fastjson/annotation/JSONType;->orders()[Ljava/lang/String;

    move-result-object v1

    :cond_2
    if-eqz v1, :cond_4

    .line 96
    array-length v1, v1

    if-eqz v1, :cond_4

    const/4 v0, 0x1

    .line 97
    invoke-static {p1, p3, p2, v0}, Lcom/alibaba/fastjson/util/TypeUtils;->computeGetters(Ljava/lang/Class;Lcom/alibaba/fastjson/annotation/JSONType;Ljava/util/Map;Z)Ljava/util/List;

    move-result-object p2

    .line 98
    new-instance p3, Ljava/util/ArrayList;

    invoke-direct {p3}, Ljava/util/ArrayList;-><init>()V

    .line 100
    invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p2

    :goto_1
    invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_3

    invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/alibaba/fastjson/util/FieldInfo;

    .line 101
    new-instance v1, Lcom/alibaba/fastjson/serializer/FieldSerializer;

    invoke-direct {v1, p1, v0}, Lcom/alibaba/fastjson/serializer/FieldSerializer;-><init>(Ljava/lang/Class;Lcom/alibaba/fastjson/util/FieldInfo;)V

    .line 102
    invoke-interface {p3, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 105
    :cond_3
    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result p1

    new-array p1, p1, [Lcom/alibaba/fastjson/serializer/FieldSerializer;

    invoke-interface {p3, p1}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object p1

    check-cast p1, [Lcom/alibaba/fastjson/serializer/FieldSerializer;

    iput-object p1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    goto :goto_2

    .line 107
    :cond_4
    iget-object p1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    array-length p1, p1

    new-array p1, p1, [Lcom/alibaba/fastjson/serializer/FieldSerializer;

    .line 108
    iget-object p2, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    iget-object p3, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    array-length p3, p3

    invoke-static {p2, v0, p1, v0, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 109
    invoke-static {p1}, Ljava/util/Arrays;->sort([Ljava/lang/Object;)V

    .line 111
    iget-object p2, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    invoke-static {p1, p2}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_5

    .line 112
    iget-object p1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    iput-object p1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    goto :goto_2

    .line 114
    :cond_5
    iput-object p1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    :goto_2
    return-void
.end method

.method public varargs constructor <init>(Ljava/lang/Class;[Ljava/lang/String;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class<",
            "*>;[",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .line 53
    invoke-static {p2}, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->createAliasMap([Ljava/lang/String;)Ljava/util/Map;

    move-result-object p2

    invoke-direct {p0, p1, p2}, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;-><init>(Ljava/lang/Class;Ljava/util/Map;)V

    return-void
.end method

.method static varargs createAliasMap([Ljava/lang/String;)Ljava/util/Map;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .line 57
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 58
    array-length v1, p0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_0

    aget-object v3, p0, v2

    .line 59
    invoke-interface {v0, v3, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    return-object v0
.end method


# virtual methods
.method public getFieldSerializer(Ljava/lang/String;)Lcom/alibaba/fastjson/serializer/FieldSerializer;
    .locals 5

    const/4 v0, 0x0

    if-nez p1, :cond_0

    return-object v0

    :cond_0
    const/4 v1, 0x0

    .line 539
    iget-object v2, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    array-length v2, v2

    add-int/lit8 v2, v2, -0x1

    :goto_0
    if-gt v1, v2, :cond_3

    add-int v3, v1, v2

    ushr-int/lit8 v3, v3, 0x1

    .line 544
    iget-object v4, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    aget-object v4, v4, v3

    iget-object v4, v4, Lcom/alibaba/fastjson/serializer/FieldSerializer;->fieldInfo:Lcom/alibaba/fastjson/util/FieldInfo;

    iget-object v4, v4, Lcom/alibaba/fastjson/util/FieldInfo;->name:Ljava/lang/String;

    .line 546
    invoke-virtual {v4, p1}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I

    move-result v4

    if-gez v4, :cond_1

    add-int/lit8 v3, v3, 0x1

    move v1, v3

    goto :goto_0

    :cond_1
    if-lez v4, :cond_2

    add-int/lit8 v3, v3, -0x1

    move v2, v3

    goto :goto_0

    .line 553
    :cond_2
    iget-object p1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    aget-object p1, p1, v3

    return-object p1

    :cond_3
    return-object v0
.end method

.method public getFieldValues(Ljava/lang/Object;)Ljava/util/List;
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Object;",
            ")",
            "Ljava/util/List<",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .line 561
    new-instance v0, Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    array-length v1, v1

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    .line 562
    iget-object v1, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    array-length v2, v1

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v2, :cond_0

    aget-object v4, v1, v3

    .line 563
    invoke-virtual {v4, p1}, Lcom/alibaba/fastjson/serializer/FieldSerializer;->getPropertyValue(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    invoke-interface {v0, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method public isWriteAsArray(Lcom/alibaba/fastjson/serializer/JSONSerializer;)Z
    .locals 2

    .line 530
    iget v0, p0, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->features:I

    sget-object v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->BeanToArray:Lcom/alibaba/fastjson/serializer/SerializerFeature;

    iget v1, v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->mask:I

    and-int/2addr v0, v1

    if-nez v0, :cond_1

    iget-object p1, p1, Lcom/alibaba/fastjson/serializer/JSONSerializer;->out:Lcom/alibaba/fastjson/serializer/SerializeWriter;

    iget-boolean p1, p1, Lcom/alibaba/fastjson/serializer/SerializeWriter;->beanToArray:Z

    if-eqz p1, :cond_0

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    goto :goto_1

    :cond_1
    :goto_0
    const/4 p1, 0x1

    :goto_1
    return p1
.end method

.method public write(Lcom/alibaba/fastjson/serializer/JSONSerializer;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/reflect/Type;I)V
    .locals 43
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    move-object/from16 v1, p0

    move-object/from16 v8, p1

    move-object/from16 v9, p2

    move-object/from16 v10, p3

    move-object/from16 v0, p4

    .line 124
    iget-object v11, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->out:Lcom/alibaba/fastjson/serializer/SerializeWriter;

    if-nez v9, :cond_0

    .line 127
    invoke-virtual {v11}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeNull()V

    return-void

    :cond_0
    move/from16 v7, p5

    .line 131
    invoke-virtual {v1, v8, v9, v7}, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->writeReference(Lcom/alibaba/fastjson/serializer/JSONSerializer;Ljava/lang/Object;I)Z

    move-result v2

    if-eqz v2, :cond_1

    return-void

    .line 137
    :cond_1
    iget-boolean v2, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->sortField:Z

    if-eqz v2, :cond_2

    .line 138
    iget-object v2, v1, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->sortedGetters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    :goto_0
    move-object v12, v2

    goto :goto_1

    .line 140
    :cond_2
    iget-object v2, v1, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->getters:[Lcom/alibaba/fastjson/serializer/FieldSerializer;

    goto :goto_0

    .line 143
    :goto_1
    iget-object v13, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->context:Lcom/alibaba/fastjson/serializer/SerialContext;

    .line 144
    iget v6, v1, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->features:I

    move-object/from16 v2, p1

    move-object v3, v13

    move-object/from16 v4, p2

    move-object/from16 v5, p3

    move/from16 v7, p5

    invoke-virtual/range {v2 .. v7}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->setContext(Lcom/alibaba/fastjson/serializer/SerialContext;Ljava/lang/Object;Ljava/lang/Object;II)V

    .line 146
    invoke-virtual/range {p0 .. p1}, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->isWriteAsArray(Lcom/alibaba/fastjson/serializer/JSONSerializer;)Z

    move-result v2

    if-eqz v2, :cond_3

    const/16 v3, 0x5b

    goto :goto_2

    :cond_3
    const/16 v3, 0x7b

    :goto_2
    if-eqz v2, :cond_4

    const/16 v4, 0x5d

    goto :goto_3

    :cond_4
    const/16 v4, 0x7d

    .line 151
    :goto_3
    :try_start_0
    invoke-virtual {v11, v3}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->append(C)Lcom/alibaba/fastjson/serializer/SerializeWriter;

    .line 153
    array-length v3, v12

    if-lez v3, :cond_5

    iget-boolean v3, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->prettyFormat:Z

    if-eqz v3, :cond_5

    .line 154
    invoke-virtual/range {p1 .. p1}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->incrementIndent()V

    .line 155
    invoke-virtual/range {p1 .. p1}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->println()V

    .line 160
    :cond_5
    iget v3, v1, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->features:I

    sget-object v5, Lcom/alibaba/fastjson/serializer/SerializerFeature;->WriteClassName:Lcom/alibaba/fastjson/serializer/SerializerFeature;

    iget v5, v5, Lcom/alibaba/fastjson/serializer/SerializerFeature;->mask:I

    and-int/2addr v3, v5

    const/4 v5, 0x0

    if-nez v3, :cond_6

    .line 161
    invoke-virtual {v8, v0, v9}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->isWriteClassName(Ljava/lang/reflect/Type;Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_7

    .line 162
    :cond_6
    invoke-virtual/range {p2 .. p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    if-eq v3, v0, :cond_7

    .line 164
    sget-object v0, Lcom/alibaba/fastjson/JSON;->DEFAULT_TYPE_KEY:Ljava/lang/String;

    invoke-virtual {v11, v0, v5}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeFieldName(Ljava/lang/String;Z)V

    .line 165
    invoke-virtual/range {p2 .. p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v8, v0}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->write(Ljava/lang/Object;)V

    const/4 v0, 0x1

    goto :goto_4

    :cond_7
    const/4 v0, 0x0

    :goto_4
    const/16 v3, 0x2c

    if-eqz v0, :cond_8

    const/16 v0, 0x2c

    goto :goto_5

    :cond_8
    const/4 v0, 0x0

    .line 173
    :goto_5
    iget-boolean v7, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->quoteFieldNames:Z

    if-eqz v7, :cond_9

    iget-boolean v7, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->useSingleQuotes:Z

    if-nez v7, :cond_9

    const/4 v7, 0x1

    goto :goto_6

    :cond_9
    const/4 v7, 0x0

    .line 174
    :goto_6
    invoke-virtual {v8, v9, v0}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->writeBefore(Ljava/lang/Object;C)C

    move-result v0

    if-ne v0, v3, :cond_a

    const/4 v0, 0x1

    goto :goto_7

    :cond_a
    const/4 v0, 0x0

    .line 177
    :goto_7
    iget-boolean v14, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->skipTransientField:Z

    .line 178
    iget-boolean v15, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->ignoreNonFieldGetter:Z

    .line 180
    iget-object v5, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->labelFilters:Ljava/util/List;

    .line 181
    iget-object v6, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->propertyFilters:Ljava/util/List;

    .line 182
    iget-object v3, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->nameFilters:Ljava/util/List;

    move/from16 v16, v0

    .line 183
    iget-object v0, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->valueFilters:Ljava/util/List;

    .line 184
    iget-object v1, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->contextValueFilters:Ljava/util/List;

    .line 185
    iget-object v10, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->propertyPreFilters:Ljava/util/List;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    move/from16 v18, v4

    move-object/from16 v17, v13

    const/4 v13, 0x0

    .line 187
    :goto_8
    :try_start_1
    array-length v4, v12

    if-ge v13, v4, :cond_51

    .line 188
    aget-object v4, v12, v13

    move-object/from16 v19, v12

    .line 190
    iget-object v12, v4, Lcom/alibaba/fastjson/serializer/FieldSerializer;->fieldInfo:Lcom/alibaba/fastjson/util/FieldInfo;

    iget-object v12, v12, Lcom/alibaba/fastjson/util/FieldInfo;->field:Ljava/lang/reflect/Field;

    move/from16 v20, v13

    .line 191
    iget-object v13, v4, Lcom/alibaba/fastjson/serializer/FieldSerializer;->fieldInfo:Lcom/alibaba/fastjson/util/FieldInfo;

    move/from16 v21, v7

    .line 192
    iget-object v7, v13, Lcom/alibaba/fastjson/util/FieldInfo;->name:Ljava/lang/String;

    move/from16 v22, v2

    .line 193
    iget-object v2, v13, Lcom/alibaba/fastjson/util/FieldInfo;->fieldClass:Ljava/lang/Class;

    if-eqz v14, :cond_b

    if-eqz v12, :cond_b

    move/from16 v23, v14

    .line 197
    iget-boolean v14, v13, Lcom/alibaba/fastjson/util/FieldInfo;->fieldTransient:Z

    if-eqz v14, :cond_c

    goto :goto_9

    :cond_b
    move/from16 v23, v14

    :cond_c
    if-eqz v15, :cond_d

    if-nez v12, :cond_d

    :goto_9
    move-object/from16 v38, v0

    move-object/from16 v40, v1

    move-object/from16 v34, v3

    move-object/from16 v31, v5

    move-object/from16 v33, v6

    move-object/from16 v24, v10

    :goto_a
    move/from16 v42, v15

    goto/16 :goto_25

    :cond_d
    if-eqz v10, :cond_f

    .line 213
    invoke-interface {v10}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v12

    :goto_b
    invoke-interface {v12}, Ljava/util/Iterator;->hasNext()Z

    move-result v14

    if-eqz v14, :cond_f

    invoke-interface {v12}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v14

    check-cast v14, Lcom/alibaba/fastjson/serializer/PropertyPreFilter;

    move-object/from16 v24, v10

    .line 214
    iget-object v10, v13, Lcom/alibaba/fastjson/util/FieldInfo;->name:Ljava/lang/String;

    invoke-interface {v14, v8, v9, v10}, Lcom/alibaba/fastjson/serializer/PropertyPreFilter;->apply(Lcom/alibaba/fastjson/serializer/JSONSerializer;Ljava/lang/Object;Ljava/lang/String;)Z

    move-result v10

    if-nez v10, :cond_e

    const/4 v10, 0x0

    goto :goto_c

    :cond_e
    move-object/from16 v10, v24

    goto :goto_b

    :cond_f
    move-object/from16 v24, v10

    const/4 v10, 0x1

    :goto_c
    if-nez v10, :cond_10

    :goto_d
    move-object/from16 v38, v0

    move-object/from16 v40, v1

    move-object/from16 v34, v3

    move-object/from16 v31, v5

    move-object/from16 v33, v6

    goto :goto_a

    :cond_10
    if-eqz v5, :cond_12

    .line 229
    invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v10

    :cond_11
    invoke-interface {v10}, Ljava/util/Iterator;->hasNext()Z

    move-result v12

    if-eqz v12, :cond_12

    invoke-interface {v10}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v12

    check-cast v12, Lcom/alibaba/fastjson/serializer/LabelFilter;

    .line 230
    iget-object v14, v13, Lcom/alibaba/fastjson/util/FieldInfo;->label:Ljava/lang/String;

    invoke-interface {v12, v14}, Lcom/alibaba/fastjson/serializer/LabelFilter;->apply(Ljava/lang/String;)Z

    move-result v12

    if-nez v12, :cond_11

    const/4 v10, 0x0

    goto :goto_e

    :cond_12
    const/4 v10, 0x1

    :goto_e
    if-nez v10, :cond_13

    goto :goto_d

    :cond_13
    const/4 v10, 0x0

    .line 249
    iget-boolean v12, v13, Lcom/alibaba/fastjson/util/FieldInfo;->fieldAccess:Z

    const-wide/16 v25, 0x0

    if-eqz v12, :cond_17

    .line 250
    sget-object v12, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v2, v12, :cond_14

    .line 251
    iget-object v12, v13, Lcom/alibaba/fastjson/util/FieldInfo;->field:Ljava/lang/reflect/Field;

    invoke-virtual {v12, v9}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I

    move-result v12

    move-object/from16 v28, v10

    move-wide/from16 v29, v25

    const/4 v10, 0x1

    const/4 v14, 0x0

    :goto_f
    const/16 v27, 0x0

    goto :goto_11

    .line 253
    :cond_14
    sget-object v12, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v2, v12, :cond_15

    .line 254
    iget-object v12, v13, Lcom/alibaba/fastjson/util/FieldInfo;->field:Ljava/lang/reflect/Field;

    invoke-virtual {v12, v9}, Ljava/lang/reflect/Field;->getLong(Ljava/lang/Object;)J

    move-result-wide v27

    move-wide/from16 v29, v27

    const/4 v12, 0x0

    const/4 v14, 0x0

    const/16 v27, 0x0

    move-object/from16 v28, v10

    const/4 v10, 0x1

    goto :goto_11

    .line 256
    :cond_15
    sget-object v12, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v2, v12, :cond_16

    .line 257
    iget-object v12, v13, Lcom/alibaba/fastjson/util/FieldInfo;->field:Ljava/lang/reflect/Field;

    invoke-virtual {v12, v9}, Ljava/lang/reflect/Field;->getBoolean(Ljava/lang/Object;)Z

    move-result v12

    move-object/from16 v28, v10

    move v14, v12

    move-wide/from16 v29, v25

    const/4 v10, 0x1

    const/4 v12, 0x0

    goto :goto_f

    .line 260
    :cond_16
    iget-object v10, v13, Lcom/alibaba/fastjson/util/FieldInfo;->field:Ljava/lang/reflect/Field;

    invoke-virtual {v10, v9}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    goto :goto_10

    .line 264
    :cond_17
    invoke-virtual {v4, v9}, Lcom/alibaba/fastjson/serializer/FieldSerializer;->getPropertyValue(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    :goto_10
    move-object/from16 v28, v10

    move-wide/from16 v29, v25

    const/4 v10, 0x0

    const/4 v12, 0x0

    const/4 v14, 0x0

    const/16 v27, 0x1

    :goto_11
    if-eqz v6, :cond_1e

    if-eqz v10, :cond_1a

    move-object/from16 v31, v5

    .line 272
    sget-object v5, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_18

    .line 273
    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v28

    :goto_12
    move-object/from16 v5, v28

    const/16 v27, 0x1

    goto :goto_13

    .line 275
    :cond_18
    sget-object v5, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_19

    .line 276
    invoke-static/range {v29 .. v30}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v28

    goto :goto_12

    .line 278
    :cond_19
    sget-object v5, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_1b

    .line 279
    invoke-static {v14}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v28

    goto :goto_12

    :cond_1a
    move-object/from16 v31, v5

    :cond_1b
    move-object/from16 v5, v28

    .line 284
    :goto_13
    invoke-interface {v6}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v28

    :goto_14
    invoke-interface/range {v28 .. v28}, Ljava/util/Iterator;->hasNext()Z

    move-result v32

    if-eqz v32, :cond_1d

    invoke-interface/range {v28 .. v28}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v32

    move-object/from16 v33, v6

    move-object/from16 v6, v32

    check-cast v6, Lcom/alibaba/fastjson/serializer/PropertyFilter;

    .line 285
    invoke-interface {v6, v9, v7, v5}, Lcom/alibaba/fastjson/serializer/PropertyFilter;->apply(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_1c

    move-object/from16 v28, v5

    move/from16 v6, v27

    const/4 v5, 0x0

    goto :goto_16

    :cond_1c
    move-object/from16 v6, v33

    goto :goto_14

    :cond_1d
    move-object/from16 v33, v6

    move-object/from16 v28, v5

    goto :goto_15

    :cond_1e
    move-object/from16 v31, v5

    move-object/from16 v33, v6

    :goto_15
    move/from16 v6, v27

    const/4 v5, 0x1

    :goto_16
    if-nez v5, :cond_1f

    move-object/from16 v38, v0

    move-object/from16 v40, v1

    move-object/from16 v34, v3

    goto/16 :goto_a

    :cond_1f
    if-eqz v3, :cond_24

    if-eqz v10, :cond_22

    if-nez v6, :cond_22

    .line 301
    sget-object v5, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_20

    .line 302
    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v28

    :goto_17
    move-object/from16 v5, v28

    const/4 v6, 0x1

    goto :goto_18

    .line 304
    :cond_20
    sget-object v5, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_21

    .line 305
    invoke-static/range {v29 .. v30}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v28

    goto :goto_17

    .line 307
    :cond_21
    sget-object v5, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_22

    .line 308
    invoke-static {v14}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v28

    goto :goto_17

    :cond_22
    move-object/from16 v5, v28

    .line 313
    :goto_18
    invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v27

    move-object/from16 v34, v3

    move-object v3, v7

    :goto_19
    invoke-interface/range {v27 .. v27}, Ljava/util/Iterator;->hasNext()Z

    move-result v28

    if-eqz v28, :cond_23

    invoke-interface/range {v27 .. v27}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v28

    move/from16 v35, v6

    move-object/from16 v6, v28

    check-cast v6, Lcom/alibaba/fastjson/serializer/NameFilter;

    .line 314
    invoke-interface {v6, v9, v3, v5}, Lcom/alibaba/fastjson/serializer/NameFilter;->process(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    move/from16 v6, v35

    goto :goto_19

    :cond_23
    move/from16 v35, v6

    move/from16 v36, v35

    goto :goto_1a

    :cond_24
    move-object/from16 v34, v3

    move/from16 v36, v6

    move-object v3, v7

    move-object/from16 v5, v28

    .line 319
    :goto_1a
    iget-boolean v6, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeNonStringValueAsString:Z

    if-eqz v6, :cond_2a

    .line 320
    sget-object v6, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v2, v6, :cond_25

    .line 321
    invoke-static {v12}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v5

    :goto_1b
    const/4 v6, 0x1

    goto :goto_1d

    .line 323
    :cond_25
    sget-object v6, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v2, v6, :cond_26

    .line 324
    invoke-static/range {v29 .. v30}, Ljava/lang/Long;->toString(J)Ljava/lang/String;

    move-result-object v5

    goto :goto_1b

    .line 326
    :cond_26
    sget-object v6, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v2, v6, :cond_27

    .line 327
    invoke-static {v14}, Ljava/lang/Boolean;->toString(Z)Ljava/lang/String;

    move-result-object v5

    goto :goto_1b

    .line 329
    :cond_27
    const-class v6, Ljava/lang/String;

    if-ne v2, v6, :cond_28

    goto :goto_1c

    .line 331
    :cond_28
    instance-of v6, v5, Ljava/lang/Number;

    if-nez v6, :cond_29

    instance-of v6, v5, Ljava/lang/Boolean;

    if-eqz v6, :cond_2a

    .line 332
    :cond_29
    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    :cond_2a
    :goto_1c
    move/from16 v6, v36

    :goto_1d
    if-eqz v0, :cond_30

    if-eqz v10, :cond_2d

    if-nez v6, :cond_2d

    move-object/from16 v37, v5

    .line 340
    sget-object v5, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_2b

    .line 341
    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    :goto_1e
    const/4 v6, 0x1

    goto :goto_1f

    .line 344
    :cond_2b
    sget-object v5, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_2c

    .line 345
    invoke-static/range {v29 .. v30}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    goto :goto_1e

    .line 348
    :cond_2c
    sget-object v5, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_2e

    .line 349
    invoke-static {v14}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v5

    goto :goto_1e

    :cond_2d
    move-object/from16 v37, v5

    :cond_2e
    move-object/from16 v5, v37

    .line 355
    :goto_1f
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v27

    move-object/from16 v38, v0

    move-object v0, v5

    :goto_20
    invoke-interface/range {v27 .. v27}, Ljava/util/Iterator;->hasNext()Z

    move-result v28

    if-eqz v28, :cond_2f

    invoke-interface/range {v27 .. v27}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v28

    move-object/from16 v39, v5

    move-object/from16 v5, v28

    check-cast v5, Lcom/alibaba/fastjson/serializer/ValueFilter;

    .line 356
    invoke-interface {v5, v9, v7, v0}, Lcom/alibaba/fastjson/serializer/ValueFilter;->process(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    move-object/from16 v5, v39

    goto :goto_20

    :cond_2f
    move-object/from16 v39, v5

    goto :goto_21

    :cond_30
    move-object/from16 v38, v0

    move-object/from16 v37, v5

    move-object/from16 v0, v37

    move-object/from16 v39, v0

    :goto_21
    if-eqz v1, :cond_34

    if-eqz v10, :cond_33

    if-nez v6, :cond_33

    .line 363
    sget-object v5, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_31

    .line 364
    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    :goto_22
    move-object/from16 v39, v0

    const/4 v6, 0x1

    goto :goto_23

    .line 367
    :cond_31
    sget-object v5, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_32

    .line 368
    invoke-static/range {v29 .. v30}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    goto :goto_22

    .line 371
    :cond_32
    sget-object v5, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v2, v5, :cond_33

    .line 372
    invoke-static {v14}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    goto :goto_22

    .line 378
    :cond_33
    :goto_23
    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v5

    :goto_24
    invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z

    move-result v27

    if-eqz v27, :cond_34

    invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v27

    move-object/from16 v40, v1

    move-object/from16 v1, v27

    check-cast v1, Lcom/alibaba/fastjson/serializer/ContextValueFilter;

    move-object/from16 v41, v5

    .line 379
    iget-object v5, v4, Lcom/alibaba/fastjson/serializer/FieldSerializer;->fieldContext:Lcom/alibaba/fastjson/serializer/BeanContext;

    invoke-interface {v1, v5, v9, v7, v0}, Lcom/alibaba/fastjson/serializer/ContextValueFilter;->process(Lcom/alibaba/fastjson/serializer/BeanContext;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    move-object/from16 v1, v40

    move-object/from16 v5, v41

    goto :goto_24

    :cond_34
    move-object/from16 v40, v1

    move-object/from16 v1, v39

    if-eqz v6, :cond_35

    if-nez v0, :cond_35

    if-nez v22, :cond_35

    .line 385
    iget-boolean v5, v4, Lcom/alibaba/fastjson/serializer/FieldSerializer;->writeNull:Z

    if-nez v5, :cond_35

    iget-boolean v5, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeMapNullValue:Z

    if-nez v5, :cond_35

    goto/16 :goto_a

    :cond_35
    if-eqz v0, :cond_3c

    .line 391
    iget-boolean v5, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->notWriteDefaultValue:Z

    if-eqz v5, :cond_3c

    .line 392
    iget-object v5, v13, Lcom/alibaba/fastjson/util/FieldInfo;->fieldClass:Ljava/lang/Class;

    move/from16 v42, v15

    .line 393
    sget-object v15, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;

    if-ne v5, v15, :cond_36

    instance-of v15, v0, Ljava/lang/Byte;

    if-eqz v15, :cond_36

    move-object v15, v0

    check-cast v15, Ljava/lang/Byte;

    .line 394
    invoke-virtual {v15}, Ljava/lang/Byte;->byteValue()B

    move-result v15

    if-nez v15, :cond_36

    goto/16 :goto_25

    .line 396
    :cond_36
    sget-object v15, Ljava/lang/Short;->TYPE:Ljava/lang/Class;

    if-ne v5, v15, :cond_37

    instance-of v15, v0, Ljava/lang/Short;

    if-eqz v15, :cond_37

    move-object v15, v0

    check-cast v15, Ljava/lang/Short;

    .line 397
    invoke-virtual {v15}, Ljava/lang/Short;->shortValue()S

    move-result v15

    if-nez v15, :cond_37

    goto :goto_25

    .line 399
    :cond_37
    sget-object v15, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v5, v15, :cond_38

    instance-of v15, v0, Ljava/lang/Integer;

    if-eqz v15, :cond_38

    move-object v15, v0

    check-cast v15, Ljava/lang/Integer;

    .line 400
    invoke-virtual {v15}, Ljava/lang/Integer;->intValue()I

    move-result v15

    if-nez v15, :cond_38

    goto :goto_25

    .line 402
    :cond_38
    sget-object v15, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v5, v15, :cond_39

    instance-of v15, v0, Ljava/lang/Long;

    if-eqz v15, :cond_39

    move-object v15, v0

    check-cast v15, Ljava/lang/Long;

    .line 403
    invoke-virtual {v15}, Ljava/lang/Long;->longValue()J

    move-result-wide v27

    cmp-long v15, v27, v25

    if-nez v15, :cond_39

    goto :goto_25

    .line 405
    :cond_39
    sget-object v15, Ljava/lang/Float;->TYPE:Ljava/lang/Class;

    if-ne v5, v15, :cond_3a

    instance-of v15, v0, Ljava/lang/Float;

    if-eqz v15, :cond_3a

    move-object v15, v0

    check-cast v15, Ljava/lang/Float;

    .line 406
    invoke-virtual {v15}, Ljava/lang/Float;->floatValue()F

    move-result v15

    const/16 v25, 0x0

    cmpl-float v15, v15, v25

    if-nez v15, :cond_3a

    goto :goto_25

    .line 408
    :cond_3a
    sget-object v15, Ljava/lang/Double;->TYPE:Ljava/lang/Class;

    if-ne v5, v15, :cond_3b

    instance-of v15, v0, Ljava/lang/Double;

    if-eqz v15, :cond_3b

    move-object v15, v0

    check-cast v15, Ljava/lang/Double;

    .line 409
    invoke-virtual {v15}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v25

    const-wide/16 v27, 0x0

    cmpl-double v15, v25, v27

    if-nez v15, :cond_3b

    goto :goto_25

    .line 411
    :cond_3b
    sget-object v15, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v5, v15, :cond_3d

    instance-of v5, v0, Ljava/lang/Boolean;

    if-eqz v5, :cond_3d

    move-object v5, v0

    check-cast v5, Ljava/lang/Boolean;

    .line 412
    invoke-virtual {v5}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v5

    if-nez v5, :cond_3d

    :goto_25
    const/4 v1, 0x0

    const/16 v5, 0x2c

    const/4 v7, 0x1

    goto/16 :goto_2c

    :cond_3c
    move/from16 v42, v15

    :cond_3d
    if-eqz v16, :cond_3e

    const/16 v5, 0x2c

    .line 418
    invoke-virtual {v11, v5}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->write(I)V

    .line 419
    iget-boolean v15, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->prettyFormat:Z

    if-eqz v15, :cond_3f

    .line 420
    invoke-virtual/range {p1 .. p1}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->println()V

    goto :goto_26

    :cond_3e
    const/16 v5, 0x2c

    :cond_3f
    :goto_26
    if-eq v3, v7, :cond_42

    if-nez v22, :cond_40

    const/4 v7, 0x1

    .line 426
    invoke-virtual {v11, v3, v7}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeFieldName(Ljava/lang/String;Z)V

    goto :goto_27

    :cond_40
    const/4 v7, 0x1

    .line 429
    :goto_27
    invoke-virtual {v8, v0}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->write(Ljava/lang/Object;)V

    :cond_41
    :goto_28
    const/4 v1, 0x0

    goto/16 :goto_2b

    :cond_42
    const/4 v7, 0x1

    if-eq v1, v0, :cond_44

    if-nez v22, :cond_43

    .line 432
    invoke-virtual {v4, v8}, Lcom/alibaba/fastjson/serializer/FieldSerializer;->writePrefix(Lcom/alibaba/fastjson/serializer/JSONSerializer;)V

    .line 434
    :cond_43
    invoke-virtual {v8, v0}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->write(Ljava/lang/Object;)V

    goto :goto_28

    :cond_44
    if-nez v22, :cond_46

    if-eqz v21, :cond_45

    .line 438
    iget-object v1, v13, Lcom/alibaba/fastjson/util/FieldInfo;->name_chars:[C

    iget-object v3, v13, Lcom/alibaba/fastjson/util/FieldInfo;->name_chars:[C

    array-length v3, v3

    const/4 v13, 0x0

    invoke-virtual {v11, v1, v13, v3}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->write([CII)V

    goto :goto_29

    .line 440
    :cond_45
    invoke-virtual {v4, v8}, Lcom/alibaba/fastjson/serializer/FieldSerializer;->writePrefix(Lcom/alibaba/fastjson/serializer/JSONSerializer;)V

    :cond_46
    :goto_29
    if-eqz v10, :cond_4a

    if-nez v6, :cond_4a

    .line 445
    sget-object v0, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    if-ne v2, v0, :cond_47

    .line 446
    iget-object v0, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->out:Lcom/alibaba/fastjson/serializer/SerializeWriter;

    invoke-virtual {v0, v12}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeInt(I)V

    goto :goto_28

    .line 447
    :cond_47
    sget-object v0, Ljava/lang/Long;->TYPE:Ljava/lang/Class;

    if-ne v2, v0, :cond_48

    .line 448
    iget-object v0, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->out:Lcom/alibaba/fastjson/serializer/SerializeWriter;

    move-wide/from16 v1, v29

    invoke-virtual {v0, v1, v2}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeLong(J)V

    goto :goto_28

    .line 449
    :cond_48
    sget-object v0, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    if-ne v2, v0, :cond_41

    if-eqz v14, :cond_49

    .line 451
    iget-object v0, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->out:Lcom/alibaba/fastjson/serializer/SerializeWriter;

    sget-object v1, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->true_chars:[C

    sget-object v2, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->true_chars:[C

    array-length v2, v2

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v3, v2}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->write([CII)V

    goto :goto_28

    .line 453
    :cond_49
    iget-object v0, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->out:Lcom/alibaba/fastjson/serializer/SerializeWriter;

    sget-object v1, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->false_chars:[C

    sget-object v2, Lcom/alibaba/fastjson/serializer/JavaBeanSerializer;->false_chars:[C

    array-length v2, v2

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v3, v2}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->write([CII)V

    goto :goto_28

    :cond_4a
    if-nez v22, :cond_50

    .line 458
    const-class v1, Ljava/lang/String;

    if-ne v2, v1, :cond_4f

    if-nez v0, :cond_4d

    .line 460
    iget v0, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->features:I

    sget-object v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->WriteNullStringAsEmpty:Lcom/alibaba/fastjson/serializer/SerializerFeature;

    iget v1, v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->mask:I

    and-int/2addr v0, v1

    if-nez v0, :cond_4c

    iget v0, v4, Lcom/alibaba/fastjson/serializer/FieldSerializer;->features:I

    sget-object v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->WriteNullStringAsEmpty:Lcom/alibaba/fastjson/serializer/SerializerFeature;

    iget v1, v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->mask:I

    and-int/2addr v0, v1

    if-eqz v0, :cond_4b

    goto :goto_2a

    .line 465
    :cond_4b
    invoke-virtual {v11}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeNull()V

    goto :goto_28

    :cond_4c
    :goto_2a
    const-string v0, ""

    .line 463
    invoke-virtual {v11, v0}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeString(Ljava/lang/String;)V

    goto :goto_28

    .line 468
    :cond_4d
    check-cast v0, Ljava/lang/String;

    .line 470
    iget-boolean v1, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->useSingleQuotes:Z

    if-eqz v1, :cond_4e

    .line 471
    invoke-virtual {v11, v0}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeStringWithSingleQuote(Ljava/lang/String;)V

    goto/16 :goto_28

    :cond_4e
    const/4 v1, 0x0

    .line 473
    invoke-virtual {v11, v0, v1}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->writeStringWithDoubleQuote(Ljava/lang/String;C)V

    goto :goto_2b

    :cond_4f
    const/4 v1, 0x0

    .line 477
    invoke-virtual {v4, v8, v0}, Lcom/alibaba/fastjson/serializer/FieldSerializer;->writeValue(Lcom/alibaba/fastjson/serializer/JSONSerializer;Ljava/lang/Object;)V

    goto :goto_2b

    :cond_50
    const/4 v1, 0x0

    .line 480
    invoke-virtual {v4, v8, v0}, Lcom/alibaba/fastjson/serializer/FieldSerializer;->writeValue(Lcom/alibaba/fastjson/serializer/JSONSerializer;Ljava/lang/Object;)V

    :goto_2b
    const/16 v16, 0x1

    :goto_2c
    add-int/lit8 v13, v20, 0x1

    move-object/from16 v12, v19

    move/from16 v7, v21

    move/from16 v2, v22

    move/from16 v14, v23

    move-object/from16 v10, v24

    move-object/from16 v5, v31

    move-object/from16 v6, v33

    move-object/from16 v3, v34

    move-object/from16 v0, v38

    move-object/from16 v1, v40

    move/from16 v15, v42

    goto/16 :goto_8

    :cond_51
    move-object/from16 v19, v12

    const/4 v1, 0x0

    const/16 v5, 0x2c

    if-eqz v16, :cond_52

    const/16 v1, 0x2c

    .line 488
    :cond_52
    invoke-virtual {v8, v9, v1}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->writeAfter(Ljava/lang/Object;C)C

    move-object/from16 v2, v19

    .line 490
    array-length v0, v2

    if-lez v0, :cond_53

    iget-boolean v0, v11, Lcom/alibaba/fastjson/serializer/SerializeWriter;->prettyFormat:Z

    if-eqz v0, :cond_53

    .line 491
    invoke-virtual/range {p1 .. p1}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->decrementIdent()V

    .line 492
    invoke-virtual/range {p1 .. p1}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->println()V

    :cond_53
    move/from16 v4, v18

    .line 495
    invoke-virtual {v11, v4}, Lcom/alibaba/fastjson/serializer/SerializeWriter;->append(C)Lcom/alibaba/fastjson/serializer/SerializeWriter;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    move-object/from16 v1, v17

    .line 510
    iput-object v1, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->context:Lcom/alibaba/fastjson/serializer/SerialContext;

    return-void

    :catchall_0
    move-exception v0

    move-object/from16 v1, v17

    goto :goto_2e

    :catch_0
    move-exception v0

    move-object/from16 v1, v17

    goto :goto_2d

    :catchall_1
    move-exception v0

    move-object v1, v13

    goto :goto_2e

    :catch_1
    move-exception v0

    move-object v1, v13

    :goto_2d
    :try_start_2
    const-string v2, "write javaBean error"

    if-eqz v9, :cond_54

    .line 499
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, ", class "

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual/range {p2 .. p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    :cond_54
    move-object v3, v2

    move-object/from16 v2, p3

    if-eqz v2, :cond_55

    .line 502
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, ", fieldName : "

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 504
    :cond_55
    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_56

    .line 505
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, ", "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 508
    :cond_56
    new-instance v2, Lcom/alibaba/fastjson/JSONException;

    invoke-direct {v2, v3, v0}, Lcom/alibaba/fastjson/JSONException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v2
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    :catchall_2
    move-exception v0

    .line 510
    :goto_2e
    iput-object v1, v8, Lcom/alibaba/fastjson/serializer/JSONSerializer;->context:Lcom/alibaba/fastjson/serializer/SerialContext;

    throw v0
.end method

.method public writeReference(Lcom/alibaba/fastjson/serializer/JSONSerializer;Ljava/lang/Object;I)Z
    .locals 3

    .line 515
    iget-object v0, p1, Lcom/alibaba/fastjson/serializer/JSONSerializer;->context:Lcom/alibaba/fastjson/serializer/SerialContext;

    .line 516
    sget-object v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->DisableCircularReferenceDetect:Lcom/alibaba/fastjson/serializer/SerializerFeature;

    iget v1, v1, Lcom/alibaba/fastjson/serializer/SerializerFeature;->mask:I

    const/4 v2, 0x0

    if-eqz v0, :cond_1

    .line 517
    iget v0, v0, Lcom/alibaba/fastjson/serializer/SerialContext;->features:I

    and-int/2addr v0, v1

    if-nez v0, :cond_0

    and-int/2addr p3, v1

    if-eqz p3, :cond_1

    :cond_0
    return v2

    .line 521
    :cond_1
    iget-object p3, p1, Lcom/alibaba/fastjson/serializer/JSONSerializer;->references:Ljava/util/IdentityHashMap;

    if-eqz p3, :cond_2

    iget-object p3, p1, Lcom/alibaba/fastjson/serializer/JSONSerializer;->references:Ljava/util/IdentityHashMap;

    invoke-virtual {p3, p2}, Ljava/util/IdentityHashMap;->containsKey(Ljava/lang/Object;)Z

    move-result p3

    if-eqz p3, :cond_2

    .line 522
    invoke-virtual {p1, p2}, Lcom/alibaba/fastjson/serializer/JSONSerializer;->writeReference(Ljava/lang/Object;)V

    const/4 p1, 0x1

    return p1

    :cond_2
    return v2
.end method
