I'm new to python and i have a list of objects like this.
Sample code
>>> for val in las.version:
... print(val.mnemonic)
... print(val.unit)
... print(val.value)
... print(val.descr)
...
VERS
1.2
some description
WRAP
NO
another description
>>>
I wanted to convert this as JSON array.
{
"versionInformation":[
{
"mnemonic":"VERS",
"unit":"",
"value":"2.0",
"description":"some description"
},
{
"mnemonic":"WRAP",
"unit":"",
"value":"NO",
"description":"another description"
}
]
}