View Source
  Class JsonValueConverter
  
  The default converter for all property editors that expose a JSON value type
    Inheritance
      System.Object
      
      
   
  
  Assembly: Umbraco.Infrastructure.dll
  Syntax
  
    public class JsonValueConverter : PropertyValueConverterBase, IDeliveryApiPropertyValueConverter, IPropertyValueConverter, IDiscoverable
   
  
  
  Constructors
  
  
    View Source
  
  JsonValueConverter(PropertyEditorCollection, ILogger<JsonValueConverter>)
  
  
  Declaration
  
    public JsonValueConverter(PropertyEditorCollection propertyEditors, ILogger<JsonValueConverter> logger)
   
  Parameters
  
  Methods
  
  
    View Source
  
  ConvertIntermediateToDeliveryApiObject(IPublishedElement, IPublishedPropertyType, PropertyCacheLevel, Object, Boolean, Boolean)
  
  
  Declaration
  
    public object ConvertIntermediateToDeliveryApiObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview, bool expanding)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Object |  | 
    
  
  
    View Source
  
  ConvertSourceToIntermediate(IPublishedElement, IPublishedPropertyType, Object, Boolean)
  
  
  Declaration
  
    public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Object |  | 
    
  
  
    View Source
  
  GetDeliveryApiPropertyCacheLevel(IPublishedPropertyType)
  
  
  Declaration
  
    public PropertyCacheLevel GetDeliveryApiPropertyCacheLevel(IPublishedPropertyType propertyType)
   
  Parameters
  
  Returns
  
  
    View Source
  
  GetDeliveryApiPropertyValueType(IPublishedPropertyType)
  
  
  Declaration
  
    public Type GetDeliveryApiPropertyValueType(IPublishedPropertyType propertyType)
   
  Parameters
  
  Returns
  
  
    View Source
  
  GetPropertyCacheLevel(IPublishedPropertyType)
  
  
  Declaration
  
    public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
   
  Parameters
  
  Returns
  
  
    View Source
  
  GetPropertyValueType(IPublishedPropertyType)
  
  
  Declaration
  
    public override Type GetPropertyValueType(IPublishedPropertyType propertyType)
   
  Parameters
  
  Returns
  
  
    View Source
  
  IsConverter(IPublishedPropertyType)
  It is a converter for any value type that is "JSON"
Unless it's in the Excluded Property Editors list
The new MediaPicker 3 stores JSON but we want to use its own ValueConvertor
Declaration
  
    public override bool IsConverter(IPublishedPropertyType propertyType)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  |