basic avro decoder for primitive types