FHIR Chat · serialization of bundle · hapi

Stream: hapi

Topic: serialization of bundle


view this post on Zulip Georg Fette (Mar 29 2019 at 09:34):

Hello, I am trying a quick way (for internal debugging processes) to serialize a bundle. As bundle implements Serializable, this should work. However when using this code:
FileOutputStream f_out = new FileOutputStream("myobject.data");
ObjectOutputStream obj_out = new ObjectOutputStream(f_out);
obj_out.writeObject ( bundle );
I get a
java.io.NotSerializableException: org.hl7.fhir.utilities.xhtml.XhtmlNode$Location
When looking at the class XhtmlNode I see that the class itself implements Serializable but the inline class Location does not. Is this some kind of bug or do I do something wrong/forbidden ?
Greetings


Last updated: Apr 12 2022 at 19:14 UTC