Update encoding.py

AFI/SAFI family is now added in the JSON message.