This could just be:

    return json.Marshal(id.String())