Overview
Features
Download
Documentation
Community
Add-Ons & Services

JSONConfiguration

Please post support and help requests here.

Re: JSONConfiguration

Postby fbraem » 15 Mar 2012, 21:14

Richard,

The problem is that only setRaw and getRaw are ment to be overloaded. Because the value is passed as std:::string to setRaw, JSONConfiguration thinks the value is a JSON string. So setting values in a JSONConfiguration is a problem.

Franky
Zumuta!, that's the way to do IT!
fbraem
 
Posts: 102
Joined: 11 Aug 2008, 22:47
Location: Belgium

Re: JSONConfiguration

Postby rmoffer » 16 Mar 2012, 01:46

I'm less worried about the setBool and setInt (at least at the proof-of-concept level) - the array and nested objects are harder to workaround.


richard.
rmoffer
 
Posts: 48
Joined: 09 Feb 2009, 19:20
Location: San Francisco bay area.

Re: JSONConfiguration

Postby rmoffer » 16 Mar 2012, 06:06

Franky,

Is the problem with setting values a short term problem implementation issue - or likely to remain for a while (months+) ?

I'm trying to work out if I need to look for another solution to create JSON files...


richard.
rmoffer
 
Posts: 48
Joined: 09 Feb 2009, 19:20
Location: San Francisco bay area.

Re: JSONConfiguration

Postby fbraem » 16 Mar 2012, 09:43

rmoffer wrote:Is the problem with setting values a short term problem implementation issue - or likely to remain for a while (months+) ?


I'm working on a solution that will create values when they don't exist. Hope to finish this work next week ...

rmoffer wrote:I'm trying to work out if I need to look for another solution to create JSON files...

If you only need to create a JSON file, you can always use the stringify method and use a file outputstream ...
Zumuta!, that's the way to do IT!
fbraem
 
Posts: 102
Joined: 11 Aug 2008, 22:47
Location: Belgium

Re: JSONConfiguration

Postby rmoffer » 16 Mar 2012, 17:17

fbraem wrote:
rmoffer wrote:Is the problem with setting values a short term problem implementation issue - or likely to remain for a while (months+) ?


I'm working on a solution that will create values when they don't exist. Hope to finish this work next week ...


Perfect.

fbraem wrote:If you only need to create a JSON file, you can always use the stringify method and use a file outputstream ...


While I need to be able to create JSON files - within days of adding that I'll need to be able to parse them to make the UI interactive (first thing my boss will ask for) :-(... The rest of my code base is architected around the XMLConfiguration classes, so its a very natural pattern for me to just slip JSON in.

I have some other things I need to be working on anyway for the next several weeks (JSON support + javascript UI is a skunk project), so I'm happy waiting for the correct solution.


Thank you.


richard.
rmoffer
 
Posts: 48
Joined: 09 Feb 2009, 19:20
Location: San Francisco bay area.

Re: JSONConfiguration

Postby fbraem » 20 Mar 2012, 22:04

A new version of JSONConfiguration is uploaded on the MQWeb repository (0.0.6 branch).
Note that it is not possible to store a null value in the configuration with the set methods.
Zumuta!, that's the way to do IT!
fbraem
 
Posts: 102
Joined: 11 Aug 2008, 22:47
Location: Belgium

Re: JSONConfiguration

Postby rmoffer » 22 Mar 2012, 18:22

Looks good.

Thanks.

richard.
rmoffer
 
Posts: 48
Joined: 09 Feb 2009, 19:20
Location: San Francisco bay area.

Re: JSONConfiguration

Postby rakesh » 24 Sep 2012, 17:53

Hello,

I checked out the sources from the mqweb project link and cannot compile it. The JSONTemplate.cpp file includes and attempts to use Poco/Util/JSONTemplateCache.h, which however is not in the repository. I just commented out the code that attempted to use the template cache and it compiles now, but just thought I would let you know.

Thanks
Rakesh
rakesh
 
Posts: 78
Joined: 13 Apr 2011, 17:43
Location: Chicago

Re: JSONConfiguration

Postby fbraem » 24 Sep 2012, 20:42

rakesh wrote:I checked out the sources from the mqweb project link and cannot compile it. The JSONTemplate.cpp file includes and attempts to use Poco/Util/JSONTemplateCache.h, which however is not in the repository. I just commented out the code that attempted to use the template cache and it compiles now, but just thought I would let you know.

The JSON code from the MQWeb project is donated to Poco and will be part of Poco 1.5
The next release of MQWeb will switch to the JSON module of Poco.

Franky
Zumuta!, that's the way to do IT!
fbraem
 
Posts: 102
Joined: 11 Aug 2008, 22:47
Location: Belgium

Previous

Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests