/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../../lib/schemas.js";
/** @internal */
export const Context$inboundSchema = z.object({});
/** @internal */
export const Context$outboundSchema = z.object({});
export function contextToJSON(context) {
    return JSON.stringify(Context$outboundSchema.parse(context));
}
export function contextFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Context$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Context' from JSON`);
}
/** @internal */
export const Loc$inboundSchema = z.union([z.string(), z.number().int()]);
/** @internal */
export const Loc$outboundSchema = z
    .union([z.string(), z.number().int()]);
export function locToJSON(loc) {
    return JSON.stringify(Loc$outboundSchema.parse(loc));
}
export function locFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Loc$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Loc' from JSON`);
}
/** @internal */
export const ValidationError$inboundSchema = z.object({
    ctx: z.lazy(() => Context$inboundSchema).optional(),
    input: z.any().optional(),
    loc: z.array(z.union([z.string(), z.number().int()])),
    msg: z.string(),
    type: z.string(),
});
/** @internal */
export const ValidationError$outboundSchema = z.object({
    ctx: z.lazy(() => Context$outboundSchema).optional(),
    input: z.any().optional(),
    loc: z.array(z.union([z.string(), z.number().int()])),
    msg: z.string(),
    type: z.string(),
});
export function validationErrorToJSON(validationError) {
    return JSON.stringify(ValidationError$outboundSchema.parse(validationError));
}
export function validationErrorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ValidationError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ValidationError' from JSON`);
}
//# sourceMappingURL=validationerror.js.map