chaokunyang opened a new issue, #2277:
URL: https://github.com/apache/fury/issues/2277
### Feature Request
Currently we don't support multi-dimensional array field serialization in
xlang meta shared mode
If we serialize such fields, we will get exception:
```java
@Test
public void testMDArrayField() {
Fory fory =
Fory.builder()
.withLanguage(Language.XLANG)
.withCodegen(false)
.withCompatibleMode(CompatibleMode.COMPATIBLE)
.build();
// TODO support multi-dimensional array serialization
fory.register(MDArrayFieldStruct.class, "example.a");
MDArrayFieldStruct s = new MDArrayFieldStruct();
s.arr = new int[][] {{1, 2}, {3, 4}};
serDeCheck(fory, s);
}
```
```java
java.lang.NullPointerException
at
org.apache.fory.serializer.ObjectSerializer.writeOtherFields(ObjectSerializer.java:141)
at
org.apache.fory.serializer.ObjectSerializer.write(ObjectSerializer.java:134)
at
org.apache.fory.serializer.ObjectSerializer.xwrite(ObjectSerializer.java:152)
at
org.apache.fory.serializer.LazySerializer.xwrite(LazySerializer.java:65)
at org.apache.fory.Fory.xwriteData(Fory.java:613)
at org.apache.fory.Fory.xwriteRef(Fory.java:548)
at org.apache.fory.Fory.xwrite(Fory.java:421)
at org.apache.fory.Fory.serialize(Fory.java:329)
at org.apache.fory.Fory.serialize(Fory.java:281)
at org.apache.fory.ForyTestBase.serDe(ForyTestBase.java:320)
at org.apache.fory.ForyTestBase.serDeCheck(ForyTestBase.java:313)
```
### Is your feature request related to a problem? Please describe
_No response_
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]