You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(5) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(10) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
|
May
(30) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
(1) |
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
(1) |
16
(1) |
17
(1) |
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
30
|
|
|
|
From: Anath B. M. <a_b...@ya...> - 2010-09-17 13:41:57
|
Hi Baptiste,
Thank you for your reply.
Sorry for this confusion. To elaborate my point (use case), I want to write/read
each 4K as a separate JSON structure/object that is enclosed within {}. For
example, each 4K JSON object would be stored as one entity/blob. This entity
will need to be a composite array (multiple arrays) for my use case enclosing
it with [] i.e. ["value1", "value2", "value3"].
I was thinking to store each 4K blob in an in-memory db in JSON for easier
composition/decomposition of the data, but this JSON takes a lot of extra space
due to its inherent tags like {}, [], which I referred as a separator. For 1M
records, the total memory size for my use case is then 4GB. However, my use case
could go even higher, e.g. 64G. So, I was also looking into the JsonCpp library
to see if there is any data compression capability added to it, but could not
find anything.
You are probably right that JSON is probably not a good choice for such a large
in-memory storage. Any further thoughts?
Thanks,
Anath B. Mandal
________________________________
From: Baptiste Lepilleur <bap...@gm...>
To: Anath Bandhu Mandal <a_b...@ya...>
Cc: jsoncpp-devel <jso...@li...>; blep
<bl...@us...>
Sent: Thu, 16 September, 2010 13:49:41
Subject: Re: Example code for Jsoncpp library
2010/9/15 Anath Bandhu Mandal <a_b...@ya...>
Hi
>
>I have been using the jsoncpp library, but having difficulties to understand how
>to effectively read/write data using Json::Value objects. You have give one
>example on http://jsoncpp.sourceforge.net/index.html, which does not explore
>much of the classes on how are they should be used. For example, I want to store
>about 4K of data with separator in one array, but this array should be added
>for a million records for read/write. However, I don't find an effective to way
>utilize this library due to limited example code.
>
>Could you please provide some example code on how to effective utilize the
>member functions for Json::Value, Json::Reader, and Json::Writer please?
You can look at the code of the jsontestrunner that is used for testing
reader/writer (e.g. it reads a json file, and rewrite it in json, as well as a
custom format).
That being said, I don't think jsoncpp is a good choice of library for your use
case: if I understood correctly (not sure what you mean by data with separator),
you want to parse 4K * 1M values. Because the parser will load the whole json
file in memory, a lot of memory is going to be wasted (I'm not even sure you
will be able to fit the Json::Value tree in memory after conversion:
4K*1M=4*10**9 => means about 4GB of memory required if each value needed only 1
byte!). Writing should not be an issue as you can use the stream based writer
that allow incremental writing to file.
Baptiste.
>
>Thanks,
>AB Mandal
>
|
|
From: Baptiste L. <bap...@gm...> - 2010-09-16 12:49:49
|
2010/9/15 Anath Bandhu Mandal <a_b...@ya...> > Hi > > I have been using the jsoncpp library, but having difficulties to > understand how to effectively read/write data using Json::Value objects. You > have give one example on http://jsoncpp.sourceforge.net/index.html, which > does not explore much of the classes on how are they should be used. For > example, I want to store about 4K of data with separator in one array, > but this array should be added for a million records for read/write. > However, I don't find an effective to way utilize this library due to > limited example code. > > Could you please provide some example code on how to effective utilize the > member functions for Json::Value, Json::Reader, and Json::Writer please? > You can look at the code of the jsontestrunner that is used for testing reader/writer (e.g. it reads a json file, and rewrite it in json, as well as a custom format). That being said, I don't think jsoncpp is a good choice of library for your use case: if I understood correctly (not sure what you mean by data with separator), you want to parse 4K * 1M values. Because the parser will load the whole json file in memory, a lot of memory is going to be wasted (I'm not even sure you will be able to fit the Json::Value tree in memory after conversion: 4K*1M=4*10**9 => means about 4GB of memory required if each value needed only 1 byte!). Writing should not be an issue as you can use the stream based writer that allow incremental writing to file. Baptiste. > Thanks, > AB Mandal > > |
|
From: Anath B. M. <a_b...@ya...> - 2010-09-15 12:03:38
|
Hi I have been using the jsoncpp library, but having difficulties to understand how to effectively read/write data using Json::Value objects. You have give one example on http://jsoncpp.sourceforge.net/index.html, which does not explore much of the classes on how are they should be used. For example, I want to store about 4K of data with separator in one array, but this array should be added for a million records for read/write. However, I don't find an effective to way utilize this library due to limited example code. Could you please provide some example code on how to effective utilize the member functions for Json::Value, Json::Reader, and Json::Writer please? Thanks, AB Mandal |
|
From: Baptiste L. <bap...@gm...> - 2010-09-02 20:20:53
|
2010/8/30 Christian Auby <chr...@au...> > If I create a Json::Value like this: > > Json::Value v; > > v["b"] = 5; > v["c"] = 6; > v["a"] = 7; > > The order in the created JSON output string will be a, b and c. Is it > possible to have them appear in the order they were first assigned (created > if you will)? This would aid a lot in debugging as the values will appear in > the order they are in the code. I also seem to have read in one of the > specifications that in one specific case the order was significant, but I > can't for the life of me find it again. > I don't remember ever seeing this features. The other JSON implementation I know, such as python json module, use an unordered map to store the key/value association. At best, you can usually hint that you would like key to be sorted alphabetically when encoding the data in JSON. Baptiste. > Please CC me on reply. > > -- > Christian > > |