code: @Override
      public String getUserPrincipals() {
          if (userPrincipals == null) {
              return null;
          }
  
          JSONObject jsonObj = new JSONObject(userPrincipals);
  
          return jsonObj.toString();
      }
docs: In contrast to getPrincipals, this is for sending a JSON value back.