glTF

module
v0.0.0-...-dc22212 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2016 License: MIT

README

GoDoc

glTF

Struct for marshaling and unmarshaling glTF

go get github.com/sturfeeinc/glTF/model

It's autogenerated code from official work group's specs. Don't edit it. Edit the generator

Libraries

Validation

There are not auto validation. You can use validator.v9 explicitly before json.Marshal.

package main

import (
	"encoding/json"
	"github.com/sturfeeinc/glTF/model"
	"gopkg.in/go-playground/validator.v9"
)

func main() {

	validate := validator.New()

	gltf := glTF{}

	// ...

	err := validate.Struct(gltf)
	if err != nil {
		// handling
	}
	res, err := json.Marshal(gltf)
	println(res)
}

I thought about realization of strict validation in MarshalJSON and UnmarshalJSON for every struct. But for now it will to much complex.

Authors

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL