Versions in this module Expand all Collapse all v0 v0.3.0 Jul 23, 2026 Changes in this version + func DecodeProject(source []byte, options InspectOptions) ([]byte, error) + func ScanProjectStrings(decoded []byte, maxStrings int) ([]string, error) + func SerializeJSON(document *SpineJSON, options JSONSerializeOptions) ([]byte, error) + func SerializeProject(document *ProjectDocument, options ProjectSerializeOptions) ([]byte, error) + func SerializeSkeletonBinary(document *SkeletonBinaryDocument) ([]byte, error) + type Bone struct + Data map[string]any + Name string + Parent string + func (b *Bone) UnmarshalJSON(data []byte) error + func (b Bone) MarshalJSON() ([]byte, error) + type DiagnosticArtifacts struct + CLILogPath string + DecodedBinaryPath string + Directory string + InspectionPath string + StringsPath string + type ErrorCode string + const ErrInvalidInput + const ErrInvalidJSON + const ErrInvalidProject + const ErrInvalidSkel + const ErrLimitExceeded + type ExportOptions struct + EditorVersion string + Executable string + ExportSettings string + Timeout time.Duration + type ExportResult struct + Artifacts DiagnosticArtifacts + Documents []ExportedDocument + Inspection ProjectInspection + OutputDirectory string + Stderr string + Stdout string + func DeserializeProjectFile(ctx context.Context, projectPath string, options ExportOptions) (*ExportResult, error) + func ExportProject(ctx context.Context, projectPath string, options ExportOptions) (*ExportResult, error) + type ExportedDocument struct + Data *SpineJSON + FileName string + Path string + type FileKind string + const FileProject + const FileSkeletonBinary + const FileSkeletonJSON + const FileUnknown + func Detect(source []byte) FileKind + type ImportArtifacts struct + InputJSONPath string + type ImportOptions struct + EditorVersion string + Executable string + JSON JSONSerializeOptions + SkeletonName string + Timeout time.Duration + type ImportResult struct + Artifacts ImportArtifacts + Inspection ProjectInspection + OutputDirectory string + ProjectPath string + Stderr string + Stdout string + func ImportProject(ctx context.Context, document *SpineJSON, projectPath string, ...) (*ImportResult, error) + func SerializeProjectFile(ctx context.Context, document *SpineJSON, projectPath string, ...) (*ImportResult, error) + type InspectFileOptions struct + OmitDecodedBinary bool + OutputDirectory string + type InspectFileResult struct + Artifacts DiagnosticArtifacts + Inspection ProjectInspection + OutputDirectory string + func InspectFile(projectPath string, options InspectFileOptions) (*InspectFileResult, error) + type InspectOptions struct + MaxStrings int + MaxUncompressedBytes int64 + type JSONSerializeOptions struct + Indent string + type ParseError struct + Cause error + Code ErrorCode + Msg string + func (e *ParseError) Error() string + func (e *ParseError) Unwrap() error + type ProjectDocument struct + Inspection ProjectInspection + Payload []byte + func DeserializeProject(source []byte, options InspectOptions) (*ProjectDocument, error) + func (d *ProjectDocument) MarshalBinary() ([]byte, error) + func (d *ProjectDocument) UnmarshalBinary(source []byte) error + type ProjectInspection struct + CompressedBytes int + Compression string + Kind FileKind + SpineVersion string + Strings []string + UncompressedBytes int + func InspectProject(source []byte, options InspectOptions) (ProjectInspection, error) + type ProjectSerializeOptions struct + CompressionLevel *int + type SkeletonBinaryDocument struct + Format SkeletonBinaryFormat + Header SkeletonBinaryInspection + Payload []byte + func DeserializeSkeletonBinary(source []byte) (*SkeletonBinaryDocument, error) + func (d *SkeletonBinaryDocument) MarshalBinary() ([]byte, error) + func (d *SkeletonBinaryDocument) UnmarshalBinary(source []byte) error + type SkeletonBinaryFormat string + const SkeletonBinaryLegacy + const SkeletonBinaryModern + type SkeletonBinaryInspection struct + Hash string + Height float32 + Kind FileKind + Nonessential bool + ReferenceScale *float32 + SpineVersion string + Width float32 + X float32 + Y float32 + func InspectSkeletonBinary(source []byte) (SkeletonBinaryInspection, error) + type SkeletonInfo struct + Audio string + FPS float64 + Hash string + Height float64 + Images string + Raw map[string]json.RawMessage + Spine string + Width float64 + X float64 + Y float64 + func (s *SkeletonInfo) UnmarshalJSON(data []byte) error + func (s SkeletonInfo) MarshalJSON() ([]byte, error) + type Slot struct + Bone string + Data map[string]any + Name string + func (s *Slot) UnmarshalJSON(data []byte) error + func (s Slot) MarshalJSON() ([]byte, error) + type SpineJSON struct + Animations map[string]json.RawMessage + Bones []Bone + Events map[string]json.RawMessage + Raw map[string]json.RawMessage + Skeleton *SkeletonInfo + Skins json.RawMessage + Slots []Slot + func DeserializeJSON(source []byte) (*SpineJSON, error) + func ParseJSON(source []byte) (*SpineJSON, error) + func (s SpineJSON) MarshalJSON() ([]byte, error)