Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi,

I have an actor for my app, which does all communication with server. For now I've managed to succesfully download, parse and render JSON data from server.

Next step would be to download image form server and show it in trigML.

I downloaded image from server and created IImage* object successfully, but I fail to set image in node data with IVfsNode_SetData. Code looks like:

bool succ = true;
succ = (succ && (SUCCESS == IACTORCONTEXT_CreateInterface(context,
wName.c_str(),
AEECLSID_PNG,
vfsContainer,
0,
&vfsNode)
));
succ = (succ && (SUCCESS == IVFSSTRUCTCONTAINER_AddChild( vfsContainer, vfsNode)));
int err = IVFSNODE_SetData(vfsNode, NULL, AEEIID_VFS_BYTE_DATA, pI, sz);

so IACTORCONTEXT_CreateInterface and IVFSSTRUCTCONTAINER_AddChild executes successfully.

IVFSNODE_SetData fails. pI is IImage** and sz is 4.
Return code is: EINVALIDFORMAT
Documentation states that means it does not support: AEECLSID_PNG.

Any help appreciated.

Thanks!

Hi Master,
can you please tell me how to decode a JSON response from the server?please its urgent to me..
thanks in advance
Regards
Priya

Hi Master,
can you please tell me how to decode a JSON response from the server?please its urgent to me..
thanks in advance
Regards
Priya

There is no quick solution for JSON as long as I know.
What I did is translated open source Java JSON parser in C++. You can find one here:
http://www.json.org/java/index.html
And this one is lightest and fastest I've found and used.
There are others too, you can find list of them on:
http://json.org/
Hope this helps.

There is no quick solution for JSON as long as I know.
What I did is translated open source Java JSON parser in C++. You can find one here:
http://www.json.org/java/index.html
And this one is lightest and fastest I've found and used.
There are others too, you can find list of them on:
http://json.org/
Hope this helps.

Hi Master,
Thanks for your response.
I need a JSON decoder in C.So can u help someway to complete my task as u have done in C++ so it will be easire for u to guide me.
Thanks in Advance
Regards
Priya

Hi Master,
Thanks for your response.
I need a JSON decoder in C.So can u help someway to complete my task as u have done in C++ so it will be easire for u to guide me.
Thanks in Advance
Regards
Priya

Hi Master,
I have already opened a post.You can find it on this link
https://brewmobileplatform.qualcomm.com/bmpforum/posts/list/1466.page
Hope u can find this and help me to solve my problem.
Thanks in advance
Regards
Priya

Hi Master,
I have already opened a post.You can find it on this link
https://brewmobileplatform.qualcomm.com/bmpforum/posts/list/1466.page
Hope u can find this and help me to solve my problem.
Thanks in advance
Regards
Priya

Hi Master,
I have gone through your code for JSON decoding but unable to understand .I think you have also used some JAVA supported JSON classes in your code. So can u guide me write in simple C as u know BREW does not have any JSON support so i need to write in simple C only.
Thanks in advance.
Regards
Priya

Hi Master,
I have gone through your code for JSON decoding but unable to understand .I think you have also used some JAVA supported JSON classes in your code. So can u guide me write in simple C as u know BREW does not have any JSON support so i need to write in simple C only.
Thanks in advance.
Regards
Priya

Unfortunatelly, there is no simple way to make this happen. The only way to do it is write your own. You'll simply have to understand what is behind those JAVA functions and use C equivalent, and write your own.
Am sorry for not being able to help you more.

Unfortunatelly, there is no simple way to make this happen. The only way to do it is write your own. You'll simply have to understand what is behind those JAVA functions and use C equivalent, and write your own.
Am sorry for not being able to help you more.

Hi Master
Thanks for your response.No need to sorry as u have tried ur level best to help me...
Thanks once again
Regards
Priya

Hi Master
Thanks for your response.No need to sorry as u have tried ur level best to help me...
Thanks once again
Regards
Priya