Skip to content

agilepro/purple

Repository files navigation

Purple Common Classes

A collection of useful utility classes for basic JSON, XML, and Streams support. This was collected by Keith Swenson through implementing many projects that needed the same kinds of classes. The collection was made open source so that anyone can use it for any Java project.

Find the documentation on line at PurpleHillsBooks PurpleDoc

Approach

The classes are designed to be lightweight and reusable. This means they do not have a lot of configurable options in order to accommodate dozens of modes of operations. The core capability is provided, and the overhead is minimal. If you want to extend the classes, then do so with programming, and not through elaborate configurations. These classes are designed to be used by Java programmers who understand how to use the Java language properly.

Contents

At a high level, the collection contains:

  • JSON support - fast and effective way to parse and generate JSON in Java. These are lightweight classes that read a JSON file with minimal overhead and represent them as collections in memory. There is no attempt to automatically transform to other Java classes -- you can do that if you wish with the basic parsing capability provided. It is really just JSONOBject (the name value association core capability) and JSONArray (for lists of things). Values are gotten with typed getters, and set with an overloaded setter. Clear exceptions are reported when anything goes wrong.
  • JSON / Exception - note particularly the conversion of an Exception object into a standard JSON representation so that the exception can easily be transmitted in a JSON protocol with a client.
  • Streams - can be very powerful if used correctly but Java is missing some convenient functions around streams. This provides these functions so they don't have to be implemented every time.
  • Test Framework - basic interfaces and base classes for implementing automated testing in Java
  • XML Support - this is largely deprecated as unnecessary. Basic XML reading and writing supported.

About

Purple Common Classes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages