Skip to content

Instantly share code, notes, and snippets.

@electrum
Created August 29, 2018 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save electrum/d05be32d334773e022b7d3a8f7c5efad to your computer and use it in GitHub Desktop.
Save electrum/d05be32d334773e022b7d3a8f7c5efad to your computer and use it in GitHub Desktop.
Drift notes for unknown field preservation
@ThriftStruct
class Foo {
@ThriftId(2);
String foo;
@ThriftId(3)
ThriftString foo;
@ThriftUnknown
Map<Short, ThriftObject> unknown;
}
ThriftObject:
ThriftString
ThriftBoolean
ThriftStruct
Map<Short, ThriftObject>
ThriftMap
TYPES:
void = Void
bool, byte, double, iXX
string = ???
struct = Map<Short, ThriftObject>
map = ThriftMap(size, keytype, valuetype, Map<ThriftObject, ThriftObject>)
set = ...
list = ...
enum = int
WIRE:
type, id, ...
type == STOP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment