Skip to content

edwardwe7/hamcrest-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hamcrest matchers for comparing JSON documents, backed by the JSONassert library. The code is released under the MIT license.

Installation

To install from Maven Central:

<dependency>
	<groupId>uk.co.datumedge</groupId>
	<artifactId>hamcrest-json</artifactId>
	<version>0.1</version>
</dependency>

Usage

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

Resources

About

Hamcrest matchers for comparing JSON documents

Resources

License

Stars

Watchers

Forks

Packages

No packages published