extension-spring5/src/main/java/com/alibaba/fastjson2/support/spring/data/mongodb/GeoJsonWriterModule.java [132:156]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {
            if (object == null) {
                jsonWriter.writeNull();
                return;
            }

            GeoJsonPoint point = (GeoJsonPoint) object;
            if (jsonWriter.utf8) {
                jsonWriter.writeRaw(utf8Prefix);
            } else if (jsonWriter.utf16) {
                jsonWriter.writeRaw(charsPrefix);
            } else {
                jsonWriter.startObject();
                jsonWriter.writeName("type");
                jsonWriter.writeColon();
                jsonWriter.writeString("Point");

                jsonWriter.writeName("coordinates");
                jsonWriter.writeColon();
            }

            jsonWriter.writeDoubleArray(point.getX(), point.getY());

            jsonWriter.endObject();
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



extension-spring6/src/main/java/com/alibaba/fastjson2/support/spring6/data/mongodb/GeoJsonWriterModule.java [132:156]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {
            if (object == null) {
                jsonWriter.writeNull();
                return;
            }

            GeoJsonPoint point = (GeoJsonPoint) object;
            if (jsonWriter.utf8) {
                jsonWriter.writeRaw(utf8Prefix);
            } else if (jsonWriter.utf16) {
                jsonWriter.writeRaw(charsPrefix);
            } else {
                jsonWriter.startObject();
                jsonWriter.writeName("type");
                jsonWriter.writeColon();
                jsonWriter.writeString("Point");

                jsonWriter.writeName("coordinates");
                jsonWriter.writeColon();
            }

            jsonWriter.writeDoubleArray(point.getX(), point.getY());

            jsonWriter.endObject();
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



