Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

hertzsprung/hamcrest-json

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Installation

To install from Maven Central:

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

Usage

import static uk.co.datumedge.hamcrest.json.SameJSONAs.*;

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

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.