You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "xiaxianggo (via GitHub)" <gi...@apache.org> on 2024/06/02 14:16:40 UTC

[I] [scala] When serializing collections and case classes in Scala, can furry support deserializing the resulting objects into corresponding Java objects in Java? [incubator-fury]

xiaxianggo opened a new issue, #1669:
URL: https://github.com/apache/incubator-fury/issues/1669

    Can furry support serializing Seq collections and case classes in Scala, and then deserializing the resulting objects into corresponding Java objects in Java?
   


-- 
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: commits-unsubscribe@fury.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org


Re: [I] [scala]Can Fury support serializing Seq collections and case classes in Scala, and then deserializing the resulting objects into corresponding Java objects in Java? [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1669: [scala]Can Fury support serializing Seq collections and case classes in Scala, and then deserializing the resulting objects into corresponding Java objects in Java?
URL: https://github.com/apache/fory/issues/1669


-- 
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: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] [scala]Can furry support serializing Seq collections and case classes in Scala, and then deserializing the resulting objects into corresponding Java objects in Java? [incubator-fury]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1669:
URL: https://github.com/apache/incubator-fury/issues/1669#issuecomment-2144299591

   Hi @xiaxianggo , you can register a customized serializer for this:
   ```java
   class SeqSerializer extends AbstractCollectionSerializer {
   
     @Override
     public Collection onCollectionWrite(MemoryBuffer buffer, Object value) {
   
     }
   
     @Override
     public Object read(MemoryBuffer buffer) {
   
     }
   
     @Override
     public Collection newCollection(MemoryBuffer buffer) {
       int numElements = buffer.readVarUint32Small7();
       setNumElements(numElements);
       ArrayList arrayList = new ArrayList(numElements);
       fury.getRefResolver().reference(arrayList);
       return arrayList;
     }
   
     @Override
     public Object onCollectionRead(Collection collection) {
   
     }
   }
   ```
   
   Take `org.apache.fury.serializer.collection.CollectionSerializers.ArrayListSerializer` as an example


-- 
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: commits-unsubscribe@fury.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org