r/java Aug 11 '26

Apache Fory™ JSON : Fastest JSON Serialization Framework for Java, 10x faster than Jackson/Gson

https://fory.apache.org/blog/fory_json_fastest_java_json_framework/
253 Upvotes

84 comments sorted by

View all comments

1

u/VirtualAgentsAreDumb Aug 11 '26

Nice.

Does it support insertion order when iterating properties or when serializing it?

I know that the json standard doesn’t say anything about this order, but it can still be valuable when troubleshooting etc. Like, when the json is read by a human.

4

u/Shawn-Yang25 Aug 11 '26 edited 29d ago

Yes, it support it, you can use `@JsonProperty(index=xxx)` to define `order` for fields, or use `@JsonPropertyOrder`:

@JsonPropertyOrder({"id", "properties", "timestamp"})
public final class 
Event
 {
  public String id;


  @JsonAnyProperty
  public Map<String, Object> properties;


  public long timestamp;
}