Marshal icon indicating copy to clipboard operation
Marshal copied to clipboard

Getting Error : Ambiguous reference to member 'value(for:inContext:)'

Open v2Nitesh opened this issue 7 years ago • 1 comments

Hi,

I have just started exploring the Marshal and tried to build some Demo, using carthage.

But getting error : Ambiguous reference to member 'value(for:inContext:)'

Line of code in my project :

let obj = personsJSON() let context = DeserializationContext() let people: [Person] = try! obj.value(for: "people", inContext: context) // Getting error on this line

Can you please check and let me know whats the issue.

Thank you Nitesh

v2Nitesh avatar Jul 07 '17 08:07 v2Nitesh

I had the same issue. Please insert this code in do {} catch {} (remove ! after try) statement and check whats going on. Maybe it will show another error. Also check if your person class implements these two protocols UnmarshalingWithContext, UnmarshalUpdatingWithContext Milczi

milczi avatar Jul 11 '17 09:07 milczi