If this is exported from some other program, if you can export it in onnx or caffe format, my understanding is that pytorch has native importers for one or both of these types.
otherwise, if it’s a proprietary format description, you can write code to convert your json format into a python object hierarchy (json.loads(json_string)), then iterate over it.
you can do something like:
class MyNetwork(nn.Module):
    def __init__(self, net_string):
        super().__init__()
        self.module_list = nn.ModuleList()
        for layer_def in json.loads(net_string):
            layer = self._create_layer(layer_def)
            self.module_list.append(layer)

    def forward(self, x):
        for layer in self.module_list:
            x = layer(x)
        return x

(edit: ie, nn.ModuleList is quite useful for such dynamic layer lists)