Skip to content

Commit

Permalink
add identity decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
bowbahdoe committed Nov 21, 2024
1 parent 002f053 commit 19e801b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.mccue</groupId>
<artifactId>json</artifactId>
<version>2024.11.17</version>
<version>2024.11.20</version>
<packaging>jar</packaging>

<properties>
Expand All @@ -31,22 +31,21 @@
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/bowbahdoe/json.git</connection>
<developerConnection>scm:git:ssh://github.com:bowbahdoe/json.git</developerConnection>
<url>http://github.com/bowbahdoe/json/tree/main</url>
<url>https://github.com/bowbahdoe/json/tree/main</url>
</scm>

<dependencies>
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>0.3.0</version>
<scope>provided</scope>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/dev/mccue/json/JsonDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -577,4 +577,12 @@ static <T> T oneOf(Json json, JsonDecoder<? extends T> decoderA, JsonDecoder<? e
throw JsonDecodeException.oneOf(Collections.unmodifiableList(errors));
}
}

static Json any(Json json) {
return json;
}

static JsonDecoder<Json> any() {
return JsonDecoder::any;
}
}

0 comments on commit 19e801b

Please sign in to comment.