Skip to content

Instantly share code, notes, and snippets.

@vepo
Last active February 15, 2023 17:40
Show Gist options
  • Save vepo/aa67d37fc0cd450e4d7090cf2c6c4462 to your computer and use it in GitHub Desktop.
Save vepo/aa67d37fc0cd450e4d7090cf2c6c4462 to your computer and use it in GitHub Desktop.
GenericRecord someRecord = /* reading from some place */
int someInt = someRecord.getInt("intValue");
String someString = someRecord.getString("stringValue");
// These are the most important
GenericRecord.Array<Integer> someIntArray = someRecord.getArray("intArrayValue", Integer.class);
GenericRecord.Array<GenericRecord> someRecordArray = someRecord.getArray("recordArrayValue", GenericRecord.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment