Coder Social home page Coder Social logo

Comments (8)

alejouribesanchez avatar alejouribesanchez commented on July 24, 2024 1

Hi @bsorrentino thanks for your answer, I understand that I can use
var jsonObject = JSON.parse( eventResult.data ); and that's exactly what I am doing.
But this is not consistent with the iOS version, because in iOS when I put the same information inside an NSDictionary, the iOS plugin is able to convert that information to a JSON object, So I am getting two different outputs, one for android and another for iOS. So it would be great if the plugin is consistent across platforms

from cordova-broadcaster.

bsorrentino avatar bsorrentino commented on July 24, 2024 1

hi @alejouribesanchez

So it would be great if the plugin is consistent across platforms

It must be, I'll work on

from cordova-broadcaster.

bsorrentino avatar bsorrentino commented on July 24, 2024 1

fix released in 4.0.0

from cordova-broadcaster.

bsorrentino avatar bsorrentino commented on July 24, 2024

hi @alejouribesanchez

The plugin essentialy allows strings exchange, so I think that JSON should be considered a convention in your software.

You states:

Note that I don't want to send the JSON as string because if I try something like this:
intent.putExtra("data", jsont.toString())
I got this:

{ 
  "data":"{\"testingkey\":\"testingValue\"}"
}

So it appears that your plugin is supporting just one depth in the JSON Object

But you can simply parse value of data (based on convention) using JSON.parse

var jsonObject = JSON.parse( eventResult.data );

What do you think about ?

from cordova-broadcaster.

alejouribesanchez avatar alejouribesanchez commented on July 24, 2024

fix released in 4.0.0

I've just tested and it's working perfect thanks!

from cordova-broadcaster.

alejouribesanchez avatar alejouribesanchez commented on July 24, 2024

Hi @bsorrentino There is something still not working in the released 4.0.0 The android Json is introducing some weird keys.
This is how looks Android
Android

This how looks iOS
iOS

from cordova-broadcaster.

bsorrentino avatar bsorrentino commented on July 24, 2024

Hi @alejouribesanchez

Thanks for feedback ... I’ll working on asap

Please consider to open a new issue so you help me to manage projects releases

Thx in advance

from cordova-broadcaster.

alejouribesanchez avatar alejouribesanchez commented on July 24, 2024

Thanks this is the new issue #48

from cordova-broadcaster.

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.