FluentJson.NET icon indicating copy to clipboard operation
FluentJson.NET copied to clipboard

FluentJson.Knockout.ToViewModel(model) where Model is a Mock

Open mike-bynum opened this issue 14 years ago • 2 comments

I get a AmbiguousMatchException when trying to use a mock in place of a real model when using fluentjson.knockout.toviewmodel.

mike-bynum avatar Dec 15 '11 21:12 mike-bynum

Will take a look, do you have any code samples? Which mocking framework? Moq?

paultyng avatar Dec 16 '11 23:12 paultyng

I did find an issue with circular referencing caused by Moq, but didn't run up on this error. One issue I've noticed is that the metadata provider will pull data on all properties, even of subtypes, which in most cases is desired, but not always.

Mocking frameworks sometimes add a bunch of properties that aren't really meaningful to be serialized. So I probably need to add a flag to exclude subtype properties.

paultyng avatar Dec 18 '11 22:12 paultyng