JSON API Document de-serializing and serializing using Spine Swift Library -
i'm using spine a swift library working json:api
i want understand how serialize data take full advantage of json api's
i'm using serializer achieve as:
let serializer = serializer() serializer.registerresource(mymodel.self)
what have got ?
let document = try! serializer.deserializedata(data) //data response nsdata
i'm able json api document included relationships , data as
document.included
for i'm casting mymodel required data
mymodel = document.included[0] as! mymodel
as not intended way utilize json :api, suggestions , missing ?
Comments
Post a Comment