Add from_json() to PrimitiveProperty and Either

This fixes issues with deserialization in abstract rendering.