Skip to content
Compiles XML Schemas into XML<->JSON mappings for Jsonix.
Branch: master
Clone or download
Latest commit a160ac7 Nov 6, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
compiler Fixes #87. Nov 6, 2018
demos/po-npm Using version >=2.3.4. May 2, 2015
dist Version 2.3.10-SNAPSHOT Jul 31, 2016
full Generating default values (#32). Oct 28, 2018
npm Version 2.3.10-SNAPSHOT Jul 31, 2016
plugin Version 2.3.10-SNAPSHOT Jul 31, 2016
samples Version 2.3.10-SNAPSHOT Jul 31, 2016
tests Fixes #87. Nov 6, 2018
.gitignore Ignore Eclipse files Oct 26, 2015
.project Initial commit. Aug 24, 2014
LICENSE Version 2.0.12-SNAPSHOT Aug 24, 2014
README.md Update README.md Nov 2, 2015
full-build-1.6.bat Added a full build batch script. Dec 22, 2014
install.bat Fixed builds, added a few ignores. Aug 24, 2014
pom.xml Version 2.3.10-SNAPSHOT Jul 31, 2016
qrelease.bat Added WFS 2.0. Mar 1, 2015
release.bat Updated the release process. Aug 24, 2014

README.md

Jsonix Schema Compiler

Generates Jsonix mappings for XML Schemas.

Please refer to Wiki for documentation.

Using in command-line

Download jsonix-schema-compiler-full-<VERSION>.jar from releases and run it with java -jar from the command line:

java -jar jsonix-schema-compiler-full-<VERSION>.jar
  [-compact -logLevel TRACE]
  schema.xsd
  [-b bindings.xjb]

See Command-Line Usage.

Using with NPM

From the command line:

npm install jsonix-schema-compiler
java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar schema.xsd

Or add jsonix-schema-compiler as dependency and invoke in scripts/prepublish.

 {
    "name": "mypackage",
    ...
    "dependencies": {
        ...
        "jsonix": "<VERSION>",
        "jsonix-schema-compiler": "<VERSION>"
    },
    "scripts": {
    	...
        "prepublish" : "java -jar node_modules/jsonix/lib/jsonix-schema-compiler-full.jar schema.xsd"
    }
}

See NPM Usage.

Using with Ant

  • Include jsonix-schema-compiler-plugin-<VERSION>.jar into xjc/classpath.
  • Include -Xjsonix and further -Xjsonix-... [[command-line options|Command-Line usage]] into arg/@line.
<xjc destdir="${basedir}/target/generated-sources/xjc" extension="true">
  <arg line="-Xjsonix -Xjsonix-compact"/>
  <binding dir="${basedir}/src/main/resources">
     <include name="**/*.xjb"/>
  </binding>
  <schema dir="${basedir}/src/main/resources">
     <include name="**/*.xsd"/>
  </schema>
  <!-- Plugins -->
  <classpath>
    <fileset dir="${basedir}/lib">
      <include name="jsonix-*.jar"/>
    </fileset>
  </classpath>
</xjc>

See Ant Usage.

Using with Maven

<plugin>
	<groupId>org.jvnet.jaxb2.maven2</groupId>
	<artifactId>maven-jaxb2-plugin</artifactId>
	<configuration>
		<extension>true</extension>
		<args>
			<arg>-Xjsonix</arg>
			<arg>-Xjsonix-compact</arg>
		</args>
		<plugins>
			<plugin>
				<groupId>org.hisrc.jsonix</groupId>
				<artifactId>jsonix-schema-compiler</artifactId>
				<version>${jsonix-schema-compiler.version}</version>
			</plugin>
		</plugins>
	</configuration>
</plugin>

See Maven Usage.

You can’t perform that action at this time.