function parseOrientation(json)
        {
            var result = {};

            result.width = parseIntValue(json, "width");
            if (result.width < 0 || result.width > WebInspector.OverridesSupport.MaxDeviceSize)
                throw new Error("Emulated device has wrong width: " + result.width);

            result.height = parseIntValue(json, "height");
            if (result.height < 0 || result.height > WebInspector.OverridesSupport.MaxDeviceSize)
                throw new Error("Emulated device has wrong height: " + result.height);

            var outlineInsets = parseValue(json["outline"], "insets", "object", null);
            if (outlineInsets) {
                result.outlineInsets = parseInsets(outlineInsets);
                if (result.outlineInsets.left < 0 || result.outlineInsets.top < 0)
                    throw new Error("Emulated device has wrong outline insets");
                result.outlineImage = /** @type {string} */ (parseValue(json["outline"], "image", "string"));
            }

            return /** @type {!WebInspector.EmulatedDevice.Orientation} */ (result);
        }
@param {*} json
@return {!WebInspector.EmulatedDevice.Orientation}