Coder Social home page Coder Social logo

Comments (3)

ocram avatar ocram commented on June 11, 2024

Good question, thanks!

This ultimately depends on how Jackson serializes your Java data to JSON strings. So you may just as well try serializing this with Jackson alone (if you like) and see what JSON output is produced.

For byte[], Jackson correctly (as per common conventions) interprets this as binary data and returns a Base64 string. So that's not what you want.

Can you try short[] instead? While the size of the numbers is not enforced correctly this way, you may enforce the correct type in your own code. In JavaScript, you could turn a normal array to Uint8Array using the Uint8Array.from method.

Does that help?

from android-ddp.

mirsadmrkaljevic avatar mirsadmrkaljevic commented on June 11, 2024

No, it did not work with short [ ] or int []. I have to convert Base64.String into Uint8Array on server side, and then I solved the problem.

One more question for you.
Is this MeteorSingleton thread safe ?

from android-ddp.

ocram avatar ocram commented on June 11, 2024

Okay, thanks. That's a useful workaround for now, at least.

Regarding thread safety, I can't really make any guarantees here. Sorry! Looking at other issues, it seems it's rather not safe.

from android-ddp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.