Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 28
Registered: ‎12-19-2012
My Device: BB 10
My Carrier: BB
Accepted Solution

QVariantMap to QVariant to JSON String

Hello,

I want to convert QVariantMap or QVariant to JSON string.

Please some wone tell me how to do this ?

 

 

 

Developer
Posts: 543
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: QVariantMap to QVariant to JSON String

http://developer.blackberry.com/native/reference/cascades/bb__data__jsondataaccess.html#function-sav...



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
New Developer
Posts: 28
Registered: ‎12-19-2012
My Device: BB 10
My Carrier: BB

Re: QVariantMap to QVariant to JSON String

Ahaa !!

Actually I am supposed to meet the deadline, hence not going to docs fully.

Anyways thanks.

 

Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: QVariantMap to QVariant to JSON String

if you need a compact Json String without whitespaces, this is at the moment only possible from a QML function:

... JSON.stringify(myData) ...

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner