Hi,
Thanks for XuYi’s suggestion, now I remove all the JSONArray, so the output
will be:
{
"a":{
"b":{
"d0":{
"s0":{
"args":{},
"StorageGroup":"root.a.b.d0",
"DataType":"INT32",
"Compressor":"UNCOMPRESSED",
"Encoding":"RLE"
}
}
},
"d0":{
"s0":{
"args":{},
"StorageGroup":"root.a.d0",
"DataType":"INT32",
"Compressor":"UNCOMPRESSED",
"Encoding":"RLE"
},
"s1":{
"args":{},
"StorageGroup":"root.a.d0",
"DataType":"INT32",
"Compressor":"UNCOMPRESSED",
"Encoding":"RLE"
}
},
"d1":{
"s0":{
"args":{},
"StorageGroup":"root.a.d1",
"DataType":"INT32",
"Compressor":"UNCOMPRESSED",
"Encoding":"RLE"
},
"s1":{
"args":{},
"StorageGroup":"root.a.d1",
"DataType":"INT32",
"Compressor":"UNCOMPRESSED",
"Encoding":"RLE"
}
}
}
}
——————————————————————————————————
毛东方
[email protected]
> 在 2019年4月4日,下午2:57,徐毅 <[email protected]> 写道:
>
>
>
> Hi,
>
>
> It seems you replace a object by using a list? Is it necessary?
> By the way, in new format, what does
> ""args":{"$ref":"$.root[0].a[0].d0[0].s0.args"}," mean ?
>
>
> Thanks
> XuYi
> On 4/4/2019 12:23,Julian Feinauer<[email protected]> wrote:
> +1
>
> Von meinem Mobiltelefon gesendet
>
> -------- Ursprüngliche Nachricht --------
> Betreff: Reforma the output of TimeSeries in JSON
> Von: 毛东方
> An: [email protected]
> Cc:
>
> Hi,
>
> Recently I found out that the output of TimeSeries metadata is not in
> standard JSON format, which creates difficulties for development of
> distributed version. As a result, I’m going to reformat the output of
> TImeSeries metadata inJSON, to make it in standard JSON format. The details
> of changes are as bellow:
>
> BEFORE:
>
> root:{
> a:{
> d0:{
> s0:{
> DataType: INT32,
> Encoding: RLE,
> Compressor: UNCOMPRESSED,
> args: {},
> StorageGroup: root.a.d0
> },
> s1:{
> DataType: INT32,
> Encoding: RLE,
> Compressor: UNCOMPRESSED,
> args: {},
> StorageGroup: root.a.d0
> }
> },
> d1:{
> s0:{
> DataType: INT32,
> Encoding: RLE,
> Compressor: UNCOMPRESSED,
> args: {},
> StorageGroup: root.a.d1
> },
> s1:{
> DataType: INT32,
> Encoding: RLE,
> Compressor: UNCOMPRESSED,
> args: {},
> StorageGroup: root.a.d1
> }
> },
> b:{
> d0:{
> s0:{
> DataType: INT32,
> Encoding: RLE,
> Compressor: UNCOMPRESSED,
> args: {},
> StorageGroup: root.a.b.d0
> }
> }
> }
> }
> }
>
>
>
> AFTER:
>
> {
> "root":[
> {
> "a":[
> {
> "d0":[
> {
> "s0":{
> "args":{},
> "StorageGroup":"root.a.d0",
> "DataType":"INT32",
> "Compressor":"UNCOMPRESSED",
> "Encoding":"RLE"
> }
> },
> {
> "s1":{
> "args":{"$ref":"$.root[0].a[0].d0[0].s0.args"},
> "StorageGroup":"root.a.d0",
> "DataType":"INT32",
> "Compressor":"UNCOMPRESSED",
> "Encoding":"RLE"
> }
> }
> ]
> },
> {
> "d1":[
> {
> "s0":{
> "args":{"$ref":"$.root[0].a[0].d0[0].s0.args"},
> "StorageGroup":"root.a.d1",
> "DataType":"INT32",
> "Compressor":"UNCOMPRESSED",
> "Encoding":"RLE"
> }
> },
> {
> "s1":{
> "args":{"$ref":"$.root[0].a[0].d0[0].s0.args"},
> "StorageGroup":"root.a.d1",
> "DataType":"INT32",
> "Compressor":"UNCOMPRESSED",
> "Encoding":"RLE"
> }
> }
> ]
> },
> {
> "b":[
> {
> "d0":[
> {
> "s0":{
> "args":{"$ref":"$.root[0].a[0].d0[0].s0.args"},
> "StorageGroup":"root.a.b.d0",
> "DataType":"INT32",
> "Compressor":"UNCOMPRESSED",
> "Encoding":"RLE"
> }
> }
> ]
> }
> ]
> }
> ]
> }
> ]
> }
>
> Best regards
> ——————————————————————————————————————————
> 毛东方
> [email protected]
>
>
>