warriordog / ActivityPubSharp

Modular implementation of ActivityPub in C#
https://warriordog.github.io/ActivityPubSharp/
Mozilla Public License 2.0
45 stars 10 forks source link

Project 1: Implement new type cache and JSON converters #79

Closed warriordog closed 1 year ago

warriordog commented 1 year ago

Implement new Type Cache and JSON converters based on the result of research in #77.

Additional work merged from #78: Design and build new TypeInfo cache. Ideally, we can make the entire conversion process fully generic like JsonPropertyInfo. That opens up the possibility of using Static Virtual Interface Members to avoid some reflection.

Additional work merged from #51: AS types should be compared with exact case. An older version of this code was incorrectly case-ignorant, and some vestiges of that still remain. Everything should be fixed to be case-sensitive, with tests to verify this behavior.

More info: https://github.com/warriordog/ActivityPubSharp/issues/74#issuecomment-1660685784

warriordog commented 1 year ago

Blocked by the linked research stories.

warriordog commented 1 year ago

No longer blocked - working this along with #78

warriordog commented 1 year ago

Idea:

Problem: collections (resolved by #82)

warriordog commented 1 year ago

Idea 2 (attempting to remove manual conversion):

warriordog commented 1 year ago

TODO: see above "change needed" comment

warriordog commented 1 year ago

Exploring custom contract resolver as possible help

warriordog commented 1 year ago

Easier solution - I think we can just remove the TypeMap from the entity and then add a no-args constructor overload.

Update: this should work! We need to replace ASLinkEntity.HasOnlyHRef, since it depends on ASTypeEntity. but that's the only broken case.

warriordog commented 1 year ago

Done