Hi all
I am trying to generate a json string like this ( pb 2017 r3 ) :
{"shovarim":[{"SystemCode":1865,"MisparShovar":186500134,"LastDateToPayTime":"0001-01-01T00:00:00","SugShovar":32,"CodeUser":1200,"Herot":null,"ProgramCreate":9,"SumToPay":2.0,"ShurotShovar":[{"Subsystem":1865,"IdentityType":1,"IdentityNum":"201561834","TransactionPropertyType":0,"Sum":2.0,"SibatShura":null,"StartDatePayment":null,"EndtDatePayment":null,"SeifTaktzivi":null,"TatSeifTaktzivi":null,"TaarichShlifa":null,"IsGvia":null}],"DateBnia":"0001-01-01T00:00:00"}]}
It's a array within array ( the values are constat here and replaced in code )
Here is my code :
lnv_JsonGenerator = Create JsonGenerator
// Create an object root item
ll_RootObject = lnv_JsonGenerator.CreateJsonObject()
if ll_RootObject <> -1 then
// Add an array child item - shovarim
ll_ChildArray = lnv_JsonGenerator.AddItemArray(ll_RootObject , "shovarim")
The problem is this :
lnv_JsonGenerator.AddItemNumber(ll_ChildArray, 'SystemCode' , SystemCode) - Not working !!
lnv_JsonGenerator.AddItemNumber(ll_ChildArray, SystemCode) - Works !!
Why is that ?
I can't write the name of the array child in the AddItemNumber ?
please help
thanks