objective c - JSON Mapping any inner objects using Mantle -


if getting response this

{     "objects" : [           {               "a" : val1,               "b" : val2,           },           {               "a" : val1,               "b" : val2,           }      ] } 

then how objects array in response?

the solutions have found follows:

1) can create model class objectsresponse representing above json , have nsarray property called objects. , can use

mtl_jsonarraytransformerwithmodelclass

to map json response objects property , access error using objectsresponse's object.

2) directly use method

[mtljsonadapter modelsofclass: [object fromjsonarray:[response objectforkey:@"objects"]]] error:&error]

is there direct way using mantle object mapping other these?

thanks


Comments

Popular posts from this blog

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -