Documentation ¶
Index ¶
- Variables
- func Generate(specification *spec.Spec, jsonlib string, packageName string, ...) *sources.Sources
- func NewTypes(jsonlib string) *types.Types
- type Generator
- type JacksonGenerator
- func (g *JacksonGenerator) ReadJson(varJson string, typeJava string) string
- func (g *JacksonGenerator) SetupLibrary(thePackage packages.Module) []sources.CodeFile
- func (g *JacksonGenerator) VersionModels(version *spec.Version, thePackage packages.Module) []sources.CodeFile
- func (g *JacksonGenerator) WriteJson(varData string) string
- type MoshiGenerator
- func (g *MoshiGenerator) ReadJson(varJson string, typeJava string) string
- func (g *MoshiGenerator) SetupLibrary(thePackage packages.Module) []sources.CodeFile
- func (g *MoshiGenerator) VersionModels(version *spec.Version, thePackage packages.Module) []sources.CodeFile
- func (g *MoshiGenerator) WriteJson(varData string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var Jackson = "jackson"
View Source
var Moshi = "moshi"
Functions ¶
Types ¶
type Generator ¶
type Generator interface { SetupLibrary(thePackage packages.Module) []sources.CodeFile VersionModels(version *spec.Version, thePackage packages.Module) []sources.CodeFile ReadJson(jsonStr string, javaType string) string WriteJson(varData string) string }
func NewGenerator ¶
type JacksonGenerator ¶
func NewJacksonGenerator ¶
func NewJacksonGenerator(types *types.Types) *JacksonGenerator
func (*JacksonGenerator) ReadJson ¶
func (g *JacksonGenerator) ReadJson(varJson string, typeJava string) string
func (*JacksonGenerator) SetupLibrary ¶
func (g *JacksonGenerator) SetupLibrary(thePackage packages.Module) []sources.CodeFile
func (*JacksonGenerator) VersionModels ¶
func (*JacksonGenerator) WriteJson ¶
func (g *JacksonGenerator) WriteJson(varData string) string
type MoshiGenerator ¶
func NewMoshiGenerator ¶
func NewMoshiGenerator(types *types.Types) *MoshiGenerator
func (*MoshiGenerator) ReadJson ¶
func (g *MoshiGenerator) ReadJson(varJson string, typeJava string) string
func (*MoshiGenerator) SetupLibrary ¶
func (g *MoshiGenerator) SetupLibrary(thePackage packages.Module) []sources.CodeFile
func (*MoshiGenerator) VersionModels ¶
func (*MoshiGenerator) WriteJson ¶
func (g *MoshiGenerator) WriteJson(varData string) string
Click to show internal directories.
Click to hide internal directories.