Add Resource::from_json() support

Allow Hal Resource objects to be created directly from Json. This only
makes sense if the Json enum is JsonObject.

This feature is still experimental.