语言

Menu
Sites
Language
Json::Compose Bug

In Tizen 2.1 I downloaded a Json from an url and I copied some parts of it into the phone using Tizen::Compose and it worked perfectly.

But since the 2.2, it seems that the longs are interpreted incorrectly, For example:

*** This is what I had before ***

 

"date"=12925480, 

"otherKey"="otherValue"

*** This is what I have now

 

"date"=1,

29255e+09,           <----- Syntax Error

"otherKey"="otherValue"

So is it a bug or is there something different to do ?

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

3 回复
john Smith
Hi Have you download from below link...https://developer.tizen.org/documentation/articles/introduction-json-on-tizen if yes, this is working fine.
Oberyn Martell
I think it's what I did Here is my code (simplified at the maximum): ****** IJsonValue* jsonVal = JsonParser::ParseN(Tizen::App::App::GetInstance()->GetAppDataPath() + L"request.json"); String path = Tizen::App::App::GetInstance()->GetAppSharedPath() + L"/data/testArt.json"; result r = JsonWriter::Compose(jsonVal, path); ****** this the file I read : ****** {"root": [ { "myNumber": 1375111258, }, "myNumber": 1375111478, } ] } ****** this is the file created by compose : ****** {"root": [ { "myNumber": 1, 37511e+09, }, "myNumber": 1, 37511e+09, } ] } So I just did a compose with the value I got with ParseN You can create a .json with the file and use the code, I think it will compile so you can see the problem
Oberyn Martell
Ok I've update the phone from 2.2beta to 2.2 and now it work fine, so it was just a 2.2beta bug Thanks