static List<MappingField> resolveFields(Map<String, Object> json) {
        Map<String, MappingField> fields = new LinkedHashMap<>();
        for (Entry<String, Object> entry : json.entrySet()) {
            String name = entry.getKey();
            QueryDataType type = resolveType(entry.getValue());

            MappingField field = new MappingField(name, type);
            fields.putIfAbsent(field.name(), field);
        }
        return new ArrayList<>(fields.values());
    }
@Test
    public void test_resolveFields() {
        // given
        Map<String, Object> json = new LinkedHashMap<>() {
            {
                put("boolean", true);
                put("number", 1);
                put("string", "string");
                put("object", emptyMap());
                put("array", emptyList());
                put("nullValue", null);
                put("null", null);
            }
        };

        // when
        List<MappingField> fields = JsonResolver.resolveFields(json);

        // then
        assertThat(fields).hasSize(7);
        assertThat(fields.get(0)).isEqualTo(new MappingField("boolean", QueryDataType.BOOLEAN));
        assertThat(fields.get(1)).isEqualTo(new MappingField("number", QueryDataType.DOUBLE));
        assertThat(fields.get(2)).isEqualTo(new MappingField("string", QueryDataType.VARCHAR));
        assertThat(fields.get(3)).isEqualTo(new MappingField("object", QueryDataType.OBJECT));
        assertThat(fields.get(4)).isEqualTo(new MappingField("array", QueryDataType.OBJECT));
        assertThat(fields.get(5)).isEqualTo(new MappingField("nullValue", QueryDataType.OBJECT));
        assertThat(fields.get(6)).isEqualTo(new MappingField("null", QueryDataType.OBJECT));
    }