Python Structure To Byte Array Javascript Methods For Objects