utahiosmac / Marshal

Marshaling the typeless wild west of [String: Any]
MIT License
698 stars 63 forks source link

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

Open v2Nitesh opened 7 years ago

v2Nitesh commented 7 years ago

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

milczi commented 7 years ago

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