encoder and decoder for position_t added to api.