This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "record", | |
| "namespace": "co.uk.dalelane", | |
| "name": "Type1", | |
| "fields": [ | |
| { | |
| "name": "something", | |
| "type": "string" | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Type1 myThing = new Type1(); | |
| myThing.setSomething("Hello"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "record", | |
| "namespace": "co.uk.dalelane", | |
| "name": "Type2", | |
| "fields": [ | |
| { | |
| "name": "myString", | |
| "type": "string" | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Type2 myThing = new Type2(); | |
| myThing.setMyString("Hello"); | |
| myThing.setMyBoolean(false); | |
| myThing.setMyDouble(12.2); | |
| myThing.setMyFloat(1.34f); | |
| myThing.setMyInt(123); | |
| myThing.setMyLong(123124l); | |
| myThing.setMyBytes(ByteBuffer.allocate(0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "record", | |
| "name": "Type3", | |
| "namespace": "co.uk.dalelane", | |
| "fields": [ | |
| { | |
| "name": "direction", | |
| "type": { | |
| "type": "enum", | |
| "name": "Compass", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Type3 myThing = new Type3(); | |
| myThing.setDirection(Compass.NORTH); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "record", | |
| "name": "Type4", | |
| "namespace": "co.uk.dalelane", | |
| "fields": [ | |
| { | |
| "name": "names", | |
| "type": { | |
| "type": "array", | |
| "name": "listOfStrings", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Type4 myThing = new Type4(); | |
| List<CharSequence> names = new ArrayList<CharSequence>(); | |
| names.add("Alice"); | |
| names.add("Bob"); | |
| myThing.setNames(names); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "record", | |
| "name": "Type5", | |
| "namespace": "co.uk.dalelane", | |
| "fields": [ | |
| { | |
| "name": "favouriteNames", | |
| "type": { | |
| "type": "map", | |
| "name": "names", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Map<CharSequence, CharSequence> everyonesFavourite = new HashMap<CharSequence, CharSequence>(); | |
| everyonesFavourite.put("alice", "Faith"); | |
| everyonesFavourite.put("bob", "Grace"); | |
| Type5 myThing = new Type5(); | |
| myThing.setFavouriteNames(everyonesFavourite); |