Tomasz Pluskiewicz
Tomasz Pluskiewicz
I just found out that this is necessary for module resolution to work. Maintaining exports manually likely is going to become unwieldy. I think there should be a check in...
I'm unsure whether it should simply produce ``` json { "@vocab": "http://schema.org/" } ``` or work like [`VocabContext()`](https://github.com/wikibus/JsonLD.Entities/blob/0fb8aebb83c87bfc3ea5fd36e7cc5400e877450e/src/JsonLD.Entities/Context/VocabContext.cs)
Oh, hi @shay99999. I don't know how it happened but I completely missed your report. Let me try to reproduce.
Okay, so obviously I never consider such usage of the serialiser and it expects input which will serialise to JSON object (`JObject.FromObject()`). A dictionary is handled as a JSON object...
Maybe you're right. Maybe except bool and string, which are implicitly typed and unambiguous. Not so with numbers though, because `Number` in JS is used to represent decimals, floats and...
Actually there was a point when I considered that. In the end I didn't need that though and always use the attribute ``` c# public class MyEntity { [JsonConverter(typeof(MyConverter))] public...
Ah, and I think that you place that attribute on a class too
At this point I'm kind of unsure whether or how the `[Type]` annotation would affect serialization. In the example above a `DateTime` would by default serialize as a ISO date...
Ok, so regarding the previous comment, I now see that this will be possible by using a custom `JsonLdLiteralConverter` and overriding the [`WriteJsonLdValue` method](https://github.com/wikibus/JsonLD.Entities/blob/bc82fda73fecddfb83389518ad56bc7a996ea86b/src/JsonLD.Entities/Converters/JsonLdLiteralConverter.cs#L120) as necessary.
Also, `CreateProperty` is the right place to read the `[Type]` attribute and apply it to the converter