First stab at resource support.
Add support for writing byte arrays into dict from js