Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Winterstein committed Dec 5, 2023
1 parent 9931584 commit 5fafa81
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/com/winterwell/gson/FlexiGsonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
import com.winterwell.utils.containers.ArrayMap;

public class FlexiGsonTest {

static record Foo(String bar) {};

@Test
public void testRecord() {
{
Gson gson = new GsonBuilder().create();
ArrayMap map = new ArrayMap("a", new Foo("bleurgh"));
String json = gson.toJson(map);
assert json.contains("bleurgh");
Object map2 = gson.fromJson(json);
System.out.println(map2);
}
}

@Test
public void testESBug() {
Expand Down

0 comments on commit 5fafa81

Please sign in to comment.