Framework for serialization to Json, XML, Byte and Excel, therefore an oviparous wool milk sow J

Overview

NetworkParser

Framework for serialization from Java objects to Json, XML and Byte.

NetworkParser is a simple framework for serializing complex model structures. To do that it transforms a given model to an intermediate model which can be serialized. It also offers lots of filters.

For serialization you are three formats available: Json, XML and Byte. For deserialization you can use following formats: Json, XML, Byte and EMF.

The Framework have many other features like:

  • Calculator
  • Date with holidays
  • UML-Layouting with Javascript or Webservice like YUML
  • JavaFX Container Classes:
    • for DataBinding
    • Table with Searchfield
    • Form
    • PopupDialog
    • Basic Shell-Class with Writing Errorfiles
  • Logicstructure
  • SimpleList as universal solution for datamodels

Current Status

  • Master
    • travis-ci: Build Status
  • Coverage: Coverage Status

  • CII Best Practices CII Best Practices

  • Codacy Codacy Badge

  • Code Climate Code Climate

  • Coverity Scan: Coverity Status

  • Glitter-Chat: Join the chat at https://gitter.im/NetworkParser/Lobby

  • Java-Documentation: Javadocs

  • Maven Central: Maven Central

  • Develop

    • travis-ci: Build Status
  • Coverage: Coverage Status

Open Hub

JProfiler optimized

Open Source Love

Average time to resolve an issue

Percentage of issues still open

Project Managment

Join the chat at https://gitter.im/NetworkParser/Lobby

Stories in Ready

Download latest Release

Getting Started

Gradle

repositories {
    mavenCentral()
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

dependencies {
	compile group: "de.uniks", name: "NetworkParser", version: "latest.integration", classifier:"sources18", changing: true
}

Installation

$ git clone https://github.com/fujaba/NetworkParser.git

Maven artifacts

Maven artifacts are available at:

Usage

Simple Example with ClassModelBuilder for build a small class model:

ClassModelBuilder mb = new ClassModelBuilder("de.uniks.studyright");
Clazz uni = mb.buildClass("University").withAttribute("name", DataType.STRING);
Clazz student = mb.buildClass("Student").withAttribute("matNo", DataType.INT);

uni.withAssoc(student, "students", Association.MANY, "uni", Association.ONE);
Clazz room = mb.buildClass("Room")
    .withAttribute("roomNo", DataType.STRING);
uni.withAssoc(room, "rooms", Association.MANY, "uni", Association.ONE);
ClassModel model = mb.build();

Simple Example with Old ClassModel for build a small class model:

ClassModel model = new ClassModel("de.uniks.studyright");
Clazz uni = model.createClazz("University").withAttribute("name", DataType.STRING);
Clazz student = model.createClazz("Student").withAttribute("matNo", DataType.INT);
        
uni.withAssoc(student, "students", Association.MANY, "uni", Association.ONE);
Clazz room = model.createClazz("Room").withAttribute("roomNo", DataType.STRING);
uni.withAssoc(room, "rooms", Association.MANY, "uni", Association.ONE);
model.generate();

simple class diagram

Maven Snapshot

pom.xml

<dependency>
	<groupId>de.uniks</groupId>
	<artifactId>NetworkParser</artifactId>
	<version>4.2.*</version>
</dependency>

<repositories>
	<repository>
		<releases><enabled>false</enabled></releases>
		<snapshots><enabled>true</enabled></snapshots>
		<id>Sonatype Snapshots</id>
		<name>Sonatype Snapshots</name>
		<url>https://oss.sonatype.org/content/repositories/snapshots</url>
	</repository>
</repositories>

Building Jar

Gradle Command Description
task Show task to run
clean Deletes the build directory.
buildAll Build All Jars
buildCoreJar Build Jar with NetworkParser-Core without dependency of JavaFX and Reflection
buildFullJar Build FullJar with Class-Files, Source-Files and JavaDoc
buildJavadoc Build JavaDoc Jar
buildSourceJar Build Jar with class-Files and Source-Files
jar Assembles a jar archive containing the main classes.

Links

Spenden

Donate

License

NetworkParser is released under an The MIT License. MIT Licence

Comments
  • ConcurrentModificationException on remove you

    ConcurrentModificationException on remove you

    To reproduce: The following generates a Concurrent Modification Exception:

    @Test
    public void testRemoveObj(){
       University uni = new University().withName("UniKasselVersitaet");
       Student student1 = uni.createStudents().withName("Peter");
       Student student2 = uni.createStudents().withName("Paul");
       Student student3 = uni.createStudents().withName("Mary");
    
       IdMap idMap = UniversityCreator.createIdMap("u");
       idMap.toJsonArray(uni);
       uni.removeYou();
    }
    

    One solution for this problem is to remove

    Collection<?> continee = (Collection<?>) reference;
    Iterator<?> i = continee.iterator();
    while (i.hasNext()) {
       creator.setValue(oldValue, prop, i.next(),
       SendableEntityCreator.REMOVE);
    }
    
    

    and replace it with

    Object[] array = ((Collection) reference).toArray();
    for (int i = 0; i < array.length; i++) {
       Object object = array[i];
       creator.setValue(oldValue, prop, object,
       SendableEntityCreator.REMOVE);
    }
    
    

    (IdMap, line 422ff) This works for newly generated Models but not for the one, that is inside the test-package. And it is also slower.

    bug enhancement question 
    opened by BiggA94 6
  • Fix headlines

    Fix headlines

    GitHub recently changed the way they parse markdown, especially headlines. Because headlines now require a space after #, the table of the gradle commands is not rendered correctly.

    This PR fixes the headlines of the README.md

    opened by nikeee 2
  • Add a Gitter chat badge to README.md

    Add a Gitter chat badge to README.md

    fujaba/NetworkParser now has a Chat Room on Gitter

    @StefanLindel has just created a chat room. You can visit it here: https://gitter.im/NetworkParser/Lobby.

    This pull-request adds this badge to your README.md:

    Gitter

    If my aim is a little off, please let me know.

    Happy chatting.

    PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

    opened by gitter-badger 2
  • Add contributing.json (GitMagic)

    Add contributing.json (GitMagic)

    Thanks for trying out GitMagic.

    Use this pull request to discuss and define what contribution guidelines you want to enforce in this repository. Here's a list of all available rules.

    If you're happy with the set of rules as it is, you can go ahead and merge it.

    If there is any rule that you are missing, or if you have any questions, send us an email at [email protected], we're happy to help.

    Good luck! :bowtie:

    How to test this PR

    It is not possible to test this pull request without merging it. Once merged, you can verify that your rules are being enforced by either opening a new pull request or creating an issue. This pull request was made by GitMagic – Magically enforcing your contribution guidelines.

    opened by ghost 1
  • JsonObject getLong()

    JsonObject getLong()

    If you call someJsObject.getLong(someKey) and the value is a String like "1234567890", then the number will not parse as a long. There will just throw a runtime exception.

    opened by KosrenDQ 1
  • JsonObject#getString(String, String) throws NullPointerException

    JsonObject#getString(String, String) throws NullPointerException

    Description

    This behaves like described on issue #2.

    String foo = new JsonObject().withValue("{\"foo\": null }").getString("foo");
    // foo is ""
    

    Trying to solve the question of #2, I tried using the overload of getString(String key, String defaultValue):

    String foo = new JsonObject().withValue("{\"foo\": null }").getString("foo", null);
    // Expected:
    // foo is either null or ""
    // Actual behaviour:
    // NullPointerException
    

    Expected Behaviour

    JsonObject#get(key, default) behaves like JsonObject#get(key) except it should return some kind of default value if the key/value was not found.

    Actual Behaviour

    NullPointerException, regardless of which value gets passed for defaultValue.

    Affected NetworkParser: 4.4.246 (using version selector [4.2,)).

    opened by nikeee 0
  • Nullable Strings?

    Nullable Strings?

    Consider this JSON document:

    {"foo": null }
    

    The foo property is either a string or null. When I try the following:

    String json = "{\"foo\": null }";
    JsonObject obj = new JsonObject().withValue(json);
    String foo = obj.getString("foo");
    

    I expected foo to be null, not "".

    How to distinguish "foo": null from "foo": ""? I looked up how org.json handles this case. As stated here, it behaves similar: http://stackoverflow.com/questions/13118146

    However, org.json provides an isNull method. Since there are no docs for the NetworkParser, I ended up looking in the source, ending up with nothing.

    That leaves me with the question: How to distinguish between "" and null using the NetworkParser library when using getString?

    Edit: I am currently using this workaround:

    String nullable = (String)obj.get("foo");
    

    However, considering this JSON document: {"foo": 5 }, the cast to String will fail because get() returns the int 5 (which seems good to me), whereas getString() returns "5" in this case.

    opened by nikeee 0
  • [Snyk] Upgrade diagramjs from 0.0.7 to 0.0.8

    [Snyk] Upgrade diagramjs from 0.0.7 to 0.0.8

    Snyk has created this PR to upgrade diagramjs from 0.0.7 to 0.0.8.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 1 version ahead of your current version.
    • The recommended version was released 4 years ago, on 2018-04-22.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by snyk-bot 0
Owner
Fujaba Tool Suite
Fujaba Tool Suite
Convert Java to JSON. Convert JSON to Java. Pretty print JSON. Java JSON serializer.

json-io Perfect Java serialization to and from JSON format (available on Maven Central). To include in your project: <dependency> <groupId>com.cedar

John DeRegnaucourt 303 Dec 30, 2022
A Java serialization/deserialization library to convert Java Objects into JSON and back

Gson Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to a

Google 21.7k Jan 8, 2023
Screaming fast JSON parsing and serialization library for Android.

#LoganSquare The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consiste

BlueLine Labs 3.2k Dec 18, 2022
A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back

A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back, with a transparent support of any kind of self-references and with a full Java 9 compatibility.

Andrey Mogilev 9 Dec 30, 2021
A compiler built in Java that allows to translate xml format to json.

A compiler built in Java that allows to translate xml format to json. Getting Started Welcome to the VS Code Java world. Here is a guideline to help y

Víctor Andrés Rojas 1 Jan 6, 2022
Simple, efficient Excel to POJO library for Java

ZeroCell ZeroCell provides a simple API for loading data from Excel sheets into Plain Old Java Objects (POJOs) using annotations to map columns from a

Credit Data CRB 68 Dec 8, 2022
Generate Java types from JSON or JSON Schema and annotates those types for data-binding with Jackson, Gson, etc

jsonschema2pojo jsonschema2pojo generates Java types from JSON Schema (or example JSON) and can annotate those types for data-binding with Jackson 2.x

Joe Littlejohn 5.9k Jan 5, 2023
JSON to JSON transformation library written in Java.

Jolt JSON to JSON transformation library written in Java where the "specification" for the transform is itself a JSON document. Useful For Transformin

Bazaarvoice 1.3k Dec 30, 2022
Essential-json - JSON without fuss

Essential JSON Essential JSON Rationale Description Usage Inclusion in your project Parsing JSON Rendering JSON Building JSON Converting to JSON Refer

Claude Brisson 1 Nov 9, 2021
A simple java JSON deserializer that can convert a JSON into a java object in an easy way

JSavON A simple java JSON deserializer that can convert a JSON into a java object in an easy way. This library also provide a strong object convertion

null 0 Mar 18, 2022
A 250 lines single-source-file hackable JSON deserializer for the JVM. Reinventing the JSON wheel.

JSON Wheel Have you ever written scripts in Java 11+ and needed to operate on some JSON string? Have you ever needed to extract just that one deeply-n

Roman Böhm 14 Jan 4, 2023
Uber-project for (some) standard Jackson textual format backends: csv, properties, yaml (xml to be added in future)

Overview This is a multi-module umbrella project for Jackson standard text-format dataformat backends. Dataformat backends are used to support format

FasterXML, LLC 351 Dec 22, 2022
A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

?? 零代码、热更新、全自动 ORM 库,后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 ?? A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

Tencent 14.4k Dec 31, 2022
A modern JSON library for Kotlin and Java.

Moshi Moshi is a modern JSON library for Android and Java. It makes it easy to parse JSON into Java objects: String json = ...; Moshi moshi = new Mos

Square 8.7k Dec 31, 2022
JSON query and transformation language

JSLT JSLT is a complete query and transformation language for JSON. The language design is inspired by jq, XPath, and XQuery. JSLT can be used as: a q

Schibsted Media Group 510 Dec 30, 2022
A JSON Schema validation implementation in pure Java, which aims for correctness and performance, in that order

Read me first The current version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version (2.0.x) was licensed under LGP

Java Json Tools 1.5k Jan 4, 2023
Java libraries for serializing, deserializing, and manipulating JSON values

java-json-toolkit The json-toolkit repository contains the code to the following libraries: json-toolkit-text: basic library for conversion between te

d-coding GmbH 2 Jan 26, 2022
A query language for JSON and a template engine to generate text output.

Josson & Jossons Josson is a query language for JSON. Jossons is a template engine to generate text output. Features and Capabilities of Josson Query

Octomix Software 16 Dec 14, 2022
High performance JVM JSON library

DSL-JSON library Fastest JVM (Java/Android/Scala/Kotlin) JSON library with advanced compile-time databinding support. Compatible with DSL Platform. Ja

New Generation Software Ltd 835 Jan 2, 2023