protected static Emoji buildEmojiFromJSON(
    JSONObject json
  ) throws UnsupportedEncodingException {
    if (!json.has("emoji")) {
      return null;
    }

    byte[] bytes = json.getString("emoji").getBytes("UTF-8");
    String description = null;
    if (json.has("description")) {
      description = json.getString("description");
    }
    boolean supportsFitzpatrick = false;
    if (json.has("supports_fitzpatrick")) {
      supportsFitzpatrick = json.getBoolean("supports_fitzpatrick");
    }
    List<String> aliases = jsonArrayToStringList(json.getJSONArray("aliases"));
    List<String> tags = jsonArrayToStringList(json.getJSONArray("tags"));
    return new Emoji(description, supportsFitzpatrick, aliases, tags, bytes);
  }
Loads a JSONArray of emojis from an InputStream, parses it and returns the
associated list of {@link com.vdurmont.emoji.Emoji}s

@param stream the stream of the JSONArray

@return the list of {@link com.vdurmont.emoji.Emoji}s
@throws IOException if an error occurs while reading the stream or parsing
the JSONArray
src/main/java/com/vdurmont/emoji/EmojiLoader.java