Add from_json() to PrimitiveProperty and Either

This fixes issues with deserialization in abstract rendering.
This is `Either` property, so it works this way. At least one type must work, tested in order from left to right. I say at least, because we can't guarantee that exactly one must work.