We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a csharp code and I am not sure if this plugin serialise the object to byte array.
Below example uses Xml.Serialization. how to use jaguar_serializer in same manner of the below csharp code? The object is a class.
So main question is how to use jaguar_serializer plugin to convert below csharp code to dart?
private static readonly Object locker = new Object(); private static byte[] ObjectToByteArray(Object objectToSerialize) { MemoryStream ms = new MemoryStream(); //BinaryFormatter formatter = new BinaryFormatter(); System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(objectToSerialize.GetType()); try { //Here's the core functionality! One Line! //To be thread-safe we lock the object lock (locker) { x.Serialize(ms, objectToSerialize); //formatter.Serialize(fs, objectToSerialize); } //return fs.ToArray(); return ms.ToArray(); } catch (SerializationException se) { return null; } finally { //fs.Close(); ms.Close(); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a csharp code and I am not sure if this plugin serialise the object to byte array.
Below example uses Xml.Serialization. how to use jaguar_serializer in same manner of the below csharp code? The object is a class.
So main question is how to use jaguar_serializer plugin to convert below csharp code to dart?
The text was updated successfully, but these errors were encountered: