Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

1.2.61 SerializerFeature.WriteNullListAsEmpty声明对数组无效 #2787

Closed
@jjjasperd

Description

@jjjasperd

如题

Activity

added a commit that references this issue on Oct 5, 2019
wenshao

wenshao commented on Oct 5, 2019

@wenshao
Member
  public void test_for_issue() throws Exception {
        Model m = new Model();
        String str = JSON.toJSONString(m, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullListAsEmpty);
        assertEquals("{\"value\":[]}", str);
    }

    public static class Model {
        public int[] value;
    }

没问题啊,你是否可以提供重现问题的testcase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wenshao@jjjasperd

        Issue actions

          1.2.61 SerializerFeature.WriteNullListAsEmpty声明对数组无效 · Issue #2787 · alibaba/fastjson