diff --git a/control/json/group.hpp b/control/json/group.hpp
new file mode 100644
index 0000000..7cc84e9
--- /dev/null
+++ b/control/json/group.hpp
@@ -0,0 +1,113 @@
+/**
+ * Copyright © 2020 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include "config_base.hpp"
+
+#include <nlohmann/json.hpp>
+#include <sdbusplus/bus.hpp>
+
+namespace phosphor::fan::control::json
+{
+
+using json = nlohmann::json;
+
+/**
+ * @class Group - Represents a group of dbus objects for configured events
+ *
+ * A group contains a list of dbus objects that are logically grouped together
+ * to be used within one-or-more configured fan control events. An event object
+ * is configured to apply a set of actions against a list of groups that could
+ * result in a fan control speed change. A group may also be configured against
+ * a list of profiles(OPTIONAL) and or denote a specific service(OPTIONAL) that
+ * serves the list of dbus objects in the group.
+ *
+ * (When no profile for a group is given, the group defaults to always be used
+ * within the events its included in)
+ *
+ */
+class Group : public ConfigBase
+{
+  public:
+    /* JSON file name for groups */
+    static constexpr auto confFileName = "groups.json";
+
+    Group() = delete;
+    Group(const Group&) = delete;
+    Group(Group&&) = delete;
+    Group& operator=(const Group&) = delete;
+    Group& operator=(Group&&) = delete;
+    ~Group() = default;
+
+    /**
+     * Constructor
+     * Parses and populates a configuration group from JSON object data
+     *
+     * @param[in] bus - sdbusplus bus object
+     * @param[in] jsonObj - JSON object
+     */
+    Group(sdbusplus::bus::bus& bus, const json& jsonObj);
+
+    /**
+     * @brief Get the members
+     *
+     * @return List of dbus paths representing the members of the group
+     */
+    inline const auto& getMembers() const
+    {
+        return _members;
+    }
+
+    /**
+     * @brief Get the service
+     *
+     * @return Service name serving the members of the group
+     */
+    inline const auto& getService() const
+    {
+        return _service;
+    }
+
+  private:
+    /* Members of the group */
+    std::vector<std::string> _members;
+
+    /* Service name serving all the members */
+    std::string _service;
+
+    /**
+     * @brief Parse and set the members list
+     *
+     * @param[in] jsonObj - JSON object for the group
+     *
+     * Sets the list of dbus paths making up the members of the group
+     */
+    void setMembers(const json& jsonObj);
+
+    /**
+     * @brief Parse and set the service name(OPTIONAL)
+     *
+     * @param[in] jsonObj - JSON object for the group
+     *
+     * Sets the service name serving the members. It is recommended this service
+     * name be provided for a group containing members served by the fan control
+     * application itself, otherwise they may not be mapped correctly into any
+     * configured events.
+     */
+    void setService(const json& jsonObj);
+};
+
+} // namespace phosphor::fan::control::json
