How to correctly deserialize a ByteArrays as an SFSObject on the client?

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

luiznsidiao
Posts: 13
Joined: 03 Aug 2019, 04:36

Re: How to correctly deserialize a ByteArrays as an SFSObject on the client?

Postby luiznsidiao » 16 Aug 2019, 15:30

I'm sorry, and yes I'm new to this so it's getting a little tricky, I'll use your suggestion and study the example, Thanks so much for the help! :)
luiznsidiao
Posts: 13
Joined: 03 Aug 2019, 04:36

Re: How to correctly deserialize a ByteArrays as an SFSObject on the client?

Postby luiznsidiao » 16 Aug 2019, 17:18

Coming back to thank you Lapo, everything is now working normally!

My suggestion is to extract the ByteArray you need directly from the server side result-set and send only that to the client.

I did:

Code: Select all

try
        {
            ISFSArray queryResult = dbManager.executeQuery(sql, new Object[] { sender.getName() });

            ISFSObject response = SFSObject.newFromBinaryData(queryResult.getSFSObject(0).getByteArray("data"));

            send("gp", response, sender);
        }
        catch (SQLException e)
        {
            trace(ExtensionLogLevel.WARN, "SQL Failed: " + e.toString());
        }


On the client i just get the "params" and all is done.

Thank you very much for the support and your patience! appreciate! :D

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 26 guests