Skip to content

trickl/assertj-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trickl AssertJ JSON

Maven Central build_status Maintainability Test Coverage License

An AssertJ fluent assertion wrapper around the Skyscreamer JSON comparison library

Installation

To install from Maven Central:

<dependency>
  <groupId>com.github.trickl</groupId>
  <artifactId>assertj-json</artifactId>
  <version>0.2.8</version>
</dependency>

Example

    assertThat(json("{\"age\":43, \"friend_ids\":[16, 23, 52]}"))
        .allowingExtraUnexpectedFields()
        .allowingAnyArrayOrdering()
        .isSameJsonAs("{\"friend_ids\":[52, 23, 16]}");

Acknowledgments

AssertJ - http://joel-costigliola.github.io/assertj/

Skyscreamer JSON Library - https://github.com/skyscreamer/JSONassert

About

An Assertj style wrapper around the wonderful Skyscreamer JSON comparison library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published