# class ov::frontend::JsonTransformationExtension¶

## Overview¶

Describes transformation that JsonConfigExtension can use as a target transformation specified by ID. JsonTransformationExtension passes JSON parsed object and matched points in the graph to JsonTransformationExtension instance, which is derived from DecoderTransformationExtension. DecoderTransformationExtension itself cannot be used for this purpose because we need to pass those additional objects which are the result of JSON parsing and graph matching that JsonTransformationExtension performs. More…

#include <json_transformation.hpp>

class JsonTransformationExtension: public ov::frontend::DecoderTransformationExtension
{
public:
// construction

JsonTransformationExtension(const std::string& id);

// methods

const std::string& id() const;

virtual bool transform(
const std::shared_ptr<ov::Model>& function,
const std::string& replacement_descriptions
) const = 0;
};

### Inherited Members¶

public:
// typedefs

typedef std::shared_ptr<Extension> Ptr;
typedef std::shared_ptr<DecoderTransformationExtension> Ptr;

// methods

void register_pass(ov::pass::Manager& manager) const;

## Detailed Documentation¶

Describes transformation that JsonConfigExtension can use as a target transformation specified by ID. JsonTransformationExtension passes JSON parsed object and matched points in the graph to JsonTransformationExtension instance, which is derived from DecoderTransformationExtension. DecoderTransformationExtension itself cannot be used for this purpose because we need to pass those additional objects which are the result of JSON parsing and graph matching that JsonTransformationExtension performs.

This class is left for backward compatibility only. In the future we would like to get rid off this class as well as from JsonConfigExtension, and users will use DecoderTransformationExtension only to match sub-graph and modify it like we do in any other transformations.

Unlike DecoderTransformationExtension, which is initialized by some ready-to-use transformation code and is not used to derive new classes by regular users, this class is intended to be derived from and it doesn’t have convenient ctos to be initialized. So it is intended for more advanced, internal users inside such components like Model Optimizer.

### Methods¶

const std::string& id() const

The name of the transformation to identify it from JSON file field ‘id’.

virtual bool transform(
const std::shared_ptr<ov::Model>& function,
const std::string& replacement_descriptions
) const = 0

Modifies OV Model according to the provided rules.

Parameters:

 function The OV Model object. replacement_descriptions The rules to modify the model in .json format.