1.When infnan is not configured, the default yyjson write flag uses YYJSON_WRITE_ALLOW_INF_AND_NAN, and the default yyjson read flag uses YYJSON_READ_ALLOW_INF_AND_NAN. This prevents serialization crashes if the user hasn't configured infnan.
2. When the user sets infnan to true, the yyjson write flag uses YYJSON_WRITE_INF_AND_NAN_AS_NULL, while the yyjson read flag still uses YYJSON_READ_ALLOW_INF_AND_NAN. This ensures compatibility for cross-language upstream and downstream communication.
1.When infnan is not configured, the default yyjson write flag uses YYJSON_WRITE_ALLOW_INF_AND_NAN, and the default yyjson read flag uses YYJSON_READ_ALLOW_INF_AND_NAN. This prevents serialization crashes if the user hasn't configured infnan.
2. When the user sets infnan to true, the yyjson write flag uses YYJSON_WRITE_INF_AND_NAN_AS_NULL, while the yyjson read flag still uses YYJSON_READ_ALLOW_INF_AND_NAN. This ensures compatibility for cross-language upstream and downstream communication.