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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -