How could I have a plugin hook into when I edit or update a post?
Craft has Hooks and Events which get invoked at different points in the core code. In your case the
entries.onBeforeSaveEntry event would be perfect.

Example:

public function init()
{
    parent::init();

    //Event: onBeforeSaveEntry
    craft()-&gt;on('entries.onBeforeSaveEntry', function(Event $event)
    {
        //Is the entry in the section 'parts'?
        if ($event-&gt;params['entry']-&gt;section == 'parts') {

            //Check if field is a number
            if (is_numeric($event-&gt;params['entry']-&gt;number_field_handle)) {
                //Do your JSON stuff

                //Replace values
                $event-&gt;params['entry']-&gt;getContent()-&gt;number_field_handle = 'something_else';
            }

        }
    });
}


The init() function goes into your Primary Plugin Class.