Fix json files

I accidentally tested pldm with a json linter and found a lot
of json issues in pldm, this commit would try to fix all of them.

The issues that are fixed in this commit are
1. As per nlohmann json, it only support // & /**/ for comments
   and those can be treated as spaces when we pass "true" for the
   skipcomments argument for the json::parse() function. Most of
   the places we used # for commenting.
2. RFC 7159 does not support hexadecimal numbers in json,so replacing
   it with its decimal equivalent.

3. This commit also adds the configuration files for eslint json linting
   as well the eslintignore configuration.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I909fae9ded93f47273276593fdf758449252f52f
diff --git a/libpldmresponder/examples/bios/enum_attrs.json b/libpldmresponder/examples/bios/enum_attrs.json
index 0b2c212..e18ffef 100644
--- a/libpldmresponder/examples/bios/enum_attrs.json
+++ b/libpldmresponder/examples/bios/enum_attrs.json
@@ -1,19 +1,19 @@
-# This is a sample JSON configuration file for BIOS enumeration type
+// This is a sample JSON configuration file for BIOS enumeration type
 {
    "entries":[
       {
          "attribute_name" : "HMCManagedState",
          "possible_values" : [ "On", "Off" ],
          "default_values" : [ "On" ],
-         # This BIOS attribute has a D-Bus property as backend.
+         // This BIOS attribute has a D-Bus property as backend.
          "dbus":
             {
                "object_path" : "/xyz/abc/def",
                "interface" : "xyz.openbmc_project.HMCManaged.State",
                "property_name" : "State",
                "property_type" : "string",
-               # Number of property_values should match to the number of possible values.
-               # Each is entry in the possible_values is mapped to entry in property_values.
+               // Number of property_values should match to the number of possible values.
+               // Each is entry in the possible_values is mapped to entry in property_values.
                "property_values" : ["xyz.openbmc_project.State.On", "xyz.openbmc_project.State.Off"]
             }
       },
@@ -44,7 +44,7 @@
             }
       },
       {
-         # This is an example of BIOS Enumeration Read only attribute
+         // This is an example of BIOS Enumeration Read only attribute
          "attribute_name" : "CodeUpdatePolicy",
          "possible_values" : [ "Concurrent", "Disruptive" ],
          "default_values" : [ "Concurrent" ]
diff --git a/libpldmresponder/examples/bios/integer_attrs.json b/libpldmresponder/examples/bios/integer_attrs.json
index a38c4a0..17f16c1 100644
--- a/libpldmresponder/examples/bios/integer_attrs.json
+++ b/libpldmresponder/examples/bios/integer_attrs.json
@@ -6,7 +6,7 @@
          "upper_bound" : 15,
          "scalar_increment" : 1,
          "default_value" : 0,
-         # This BIOS attribute has a D-Bus property as backend.
+         // This BIOS attribute has a D-Bus property as backend.
          "dbus":{
             "object_path" : "/xyz/openbmc_project/avsbus",
             "interface" : "xyz.openbmc.AvsBus.Manager",
@@ -15,7 +15,7 @@
          }
       },
       {
-         # This is an example of BIOS Integer Read only attribute
+         // This is an example of BIOS Integer Read only attribute
          "attribute_name" : "SBE_IMAGE_MINIMUM_VALID_ECS",
          "lower_bound" : 1,
          "upper_bound" : 15,
@@ -23,8 +23,8 @@
          "default_value" : 2
       },
       {
-         # This atttribute has invalid default value or scalar_increment, when
-         # scalar_increment=2 and lower_bound=1, default_value must be 1, 3, 5...
+         // This atttribute has invalid default value or scalar_increment, when
+         // scalar_increment=2 and lower_bound=1, default_value must be 1, 3, 5...
          "attribute_name" : "INTEGER_INVALID_CASE",
          "lower_bound" : 1,
          "upper_bound" : 15,
diff --git a/libpldmresponder/examples/bios/string_attrs.json b/libpldmresponder/examples/bios/string_attrs.json
index 7346994..2e2eaf1 100644
--- a/libpldmresponder/examples/bios/string_attrs.json
+++ b/libpldmresponder/examples/bios/string_attrs.json
@@ -1,16 +1,16 @@
-# This is a sample JSON configuration file for BIOS string type
+// This is a sample JSON configuration file for BIOS string type
 {
    "entries":[
       {
          "attribute_name" : "str_example1",
-         # Possible values of string type {Unknown=0x00, ASCII=0x01, Hex=0x02,
-         # UTF-8=0x03, UTF-16LE=0x04, UTF-16BE=0x05, Vendor Specific=0xFF}
+         // Possible values of string type {Unknown=0x00, ASCII=0x01, Hex=0x02,
+         // UTF-8=0x03, UTF-16LE=0x04, UTF-16BE=0x05, Vendor Specific=0xFF}
          "string_type" : "ASCII",
          "minimum_string_length" : 1,
          "maximum_string_length" : 100,
          "default_string_length" : 3,
          "default_string" : "abc",
-         # This BIOS attribute has a D-Bus property as backend.
+         // This BIOS attribute has a D-Bus property as backend.
          "dbus":
             {
                "object_path" : "/xyz/abc/def",
@@ -35,7 +35,7 @@
             }
       },
       {
-         # This is an example of BIOS String Read only attribute
+         // This is an example of BIOS String Read only attribute
          "attribute_name" : "str_example3",
          "string_type" : "Unknown",
          "minimum_string_length" : 1,
diff --git a/libpldmresponder/examples/effecter/dbus_to_host_effecter.json b/libpldmresponder/examples/effecter/dbus_to_host_effecter.json
index 3fbcb82..4646693 100644
--- a/libpldmresponder/examples/effecter/dbus_to_host_effecter.json
+++ b/libpldmresponder/examples/effecter/dbus_to_host_effecter.json
@@ -1,27 +1,27 @@
 {
     "entries": [
         {
-            #mctp eid is needed for communicating with the host
+            // mctp eid is needed for communicating with the host
             "mctp_eid": 9,
             "effecter_info": {
-                #a 0xFFFF means effecter id is not hard coded and will be
-                #fetched from the PDR
-                "effecterID": 0xFFFF,
+                // a 0xFFFF(65535) means effecter id is not hard coded and
+                // will be fetched from the PDR
+                "effecterID": 65535,
                 "containerID": 1,
                 "entityType": 32801,
-                # entity type 33 means Phyp will set value 32801 
-                # this is because the MSB is set to indicate
-                #virtual entity
+                // entity type 33 means Phyp will set value 32801
+                // this is because the MSB is set to indicate
+                // virtual entity
                 "entityInstance": 1,
                 "compositeEffecterCount": 3
             },
             "effecters": [
                 {
-                # Following are the D-Bus information under each effecter 
-                #which are monitored for a property change signal
+                // Following are the D-Bus information under each effecter
+                // which are monitored for a property change signal
 
-                #if there is a property change, the corresponding
-                #state value is picked up to set the host effecter
+                // if there is a property change, the corresponding
+                // state value is picked up to set the host effecter
 
                     "dbus_info": {
                         "object_path": "/xyz/abc/def",
@@ -35,8 +35,8 @@
                     },
                     "state" : {
                         "id" : 197,
-                        # This should be of same size and order as
-                        # property_values
+                        // This should be of same size and order as
+                        // property_values
                         "state_values": [
                             0,
                             1
diff --git a/libpldmresponder/examples/events/event_state_sensor.json b/libpldmresponder/examples/events/event_state_sensor.json
index 6ab566e..17ce751 100644
--- a/libpldmresponder/examples/events/event_state_sensor.json
+++ b/libpldmresponder/examples/events/event_state_sensor.json
@@ -1,8 +1,8 @@
-# Each entry is to uniquely identify a remote state sensor(there are separate
-# entry for each sensor in a composite sensor) and the supported event states.
-# The "dbus" section contains information about the corresponding D-Bus
-# property for the sensor and "property_values" are the D-Bus property values
-# for each corresponding entry in the "event_states"
+// Each entry is to uniquely identify a remote state sensor(there are separate
+// entry for each sensor in a composite sensor) and the supported event states.
+// The "dbus" section contains information about the corresponding D-Bus
+// property for the sensor and "property_values" are the D-Bus property values
+// for each corresponding entry in the "event_states"
 {
     "entries": [
         {
diff --git a/libpldmresponder/examples/fru/Board_General.json b/libpldmresponder/examples/fru/Board_General.json
index fc58c3c..c9914b6 100644
--- a/libpldmresponder/examples/fru/Board_General.json
+++ b/libpldmresponder/examples/fru/Board_General.json
@@ -1,19 +1,19 @@
-# This JSON has the information needed to create General FRU record for FRU of
-# type Board. The FRU fields are based on the PLDM specification DSP0257.
+// This JSON has the information needed to create General FRU record for FRU of
+// type Board. The FRU fields are based on the PLDM specification DSP0257.
 {
    "record_details":
    {
-        # FRU Record Type - General FRU Record
+        // FRU Record Type - General FRU Record
         "fru_record_type" : 1,
-        # Encoding Type for FRU fields - ASCII
+        // Encoding Type for FRU fields - ASCII
         "fru_encoding_type": 1,
         "dbus_interface_name": "xyz.openbmc_project.Inventory.Item.Board"
    },
    "fru_fields":[
       {
-         # FRU Field Type 3 - Part Number
+         // FRU Field Type 3 - Part Number
          "fru_field_type" : 3,
-         # D-Bus property to read and populate the FRU field
+         // D-Bus property to read and populate the FRU field
          "dbus":
             {
                "interface" : "xyz.openbmc_project.Inventory.Decorator.Asset",
@@ -22,9 +22,9 @@
             }
       },
       {
-         # FRU Field Type 4 - Serial Number
+         // FRU Field Type 4 - Serial Number
          "fru_field_type" : 4,
-         # D-Bus property to read and populate the FRU field
+         // D-Bus property to read and populate the FRU field
          "dbus":
             {
                "interface" : "xyz.openbmc_project.Inventory.Decorator.Asset",
diff --git a/libpldmresponder/examples/fru/Board_VINI.json b/libpldmresponder/examples/fru/Board_VINI.json
index fd58717..fbb710a 100644
--- a/libpldmresponder/examples/fru/Board_VINI.json
+++ b/libpldmresponder/examples/fru/Board_VINI.json
@@ -1,19 +1,19 @@
-# This JSON has the information needed to create OEM FRU record VINI for FRU of
-# type Board.
+// This JSON has the information needed to create OEM FRU record VINI for FRU of
+// type Board.
 {
    "record_details":
    {
-        # FRU Record Type - OEM FRU Record
+        // FRU Record Type - OEM FRU Record
         "fru_record_type" : 254,
-        # Encoding Type for FRU fields - ASCII
+        // Encoding Type for FRU fields - ASCII
         "fru_encoding_type": 1,
         "dbus_interface_name": "xyz.openbmc_project.Inventory.Item.Board"
    },
    "fru_fields":[
       {
-         # FRU Field Type 2 - Keyword RT
+         // FRU Field Type 2 - Keyword RT
          "fru_field_type" : 2,
-         # D-Bus property to read and populate the FRU field
+         // D-Bus property to read and populate the FRU field
          "dbus":
             {
                "interface" : "com.ibm.ipzvpd.VINI",
@@ -22,9 +22,9 @@
             }
       },
       {
-         # FRU Field Type 3 - Keyword B3
+         // FRU Field Type 3 - Keyword B3
          "fru_field_type" : 3,
-         # D-Bus property to read and populate the FRU field
+         // D-Bus property to read and populate the FRU field
          "dbus":
             {
                "interface" : "com.ibm.ipzvpd.VINI",
diff --git a/libpldmresponder/examples/fru/Cpu_General.json b/libpldmresponder/examples/fru/Cpu_General.json
index 8021001..3595d79 100644
--- a/libpldmresponder/examples/fru/Cpu_General.json
+++ b/libpldmresponder/examples/fru/Cpu_General.json
@@ -1,19 +1,19 @@
-# This JSON has the information needed to create General FRU record for FRU of
-# type Cpu. The FRU fields are based on the PLDM specification DSP0257.
+// This JSON has the information needed to create General FRU record for FRU of
+// type Cpu. The FRU fields are based on the PLDM specification DSP0257.
 {
    "record_details":
    {
-        # FRU Record Type - General FRU Record
+        // FRU Record Type - General FRU Record
         "fru_record_type" : 1,
-        # Encoding Type for FRU fields - ASCII
+        // Encoding Type for FRU fields - ASCII
         "fru_encoding_type": 1,
         "dbus_interface_name": "xyz.openbmc_project.Inventory.Item.Cpu"
    },
    "fru_fields":[
       {
-         # FRU Field Type 3 - Part Number
+         // FRU Field Type 3 - Part Number
          "fru_field_type" : 3,
-         # D-Bus property to read and populate the FRU field
+         // D-Bus property to read and populate the FRU field
          "dbus":
             {
                "interface" : "xyz.openbmc_project.Inventory.Decorator.Asset",
@@ -22,9 +22,9 @@
             }
       },
       {
-         # FRU Field Type 4 - Serial Number
+         // FRU Field Type 4 - Serial Number
          "fru_field_type" : 4,
-         # D-Bus property to read and populate the FRU field
+         // D-Bus property to read and populate the FRU field
          "dbus":
             {
                "interface" : "xyz.openbmc_project.Inventory.Decorator.Asset",
diff --git a/libpldmresponder/examples/fru/FRU_Master.json b/libpldmresponder/examples/fru/FRU_Master.json
index 73c7ebb..710c5e1 100644
--- a/libpldmresponder/examples/fru/FRU_Master.json
+++ b/libpldmresponder/examples/fru/FRU_Master.json
@@ -1,16 +1,16 @@
-# This is the master config file for generating PLDM FRU records from the D-Bus
-# inventory objects. "service" is the name of D-Bus service hosting the
-# inventory D-Bus objects, "root_path" is the root path for all the inventory
-# D-Bus objects and "entities" section specifies the type of FRU's for which
-# FRU records are created in the FRU table. FRU Record Set PDR and Entity
-# Association PDR are generated for matching FRU. In this example, PLDM FRU
-# records will be created for all FRU's of type Board and CPU. The "entity_type"
-# field is the PLDM entity type for Board and CPU. For each FRU type,
-# corresponding config JSON's are needed for each record. In the example
-# directory, Board_General.json is the config to generate the General FRU
-# record for FRU of type Board and Board_VINI.json is the config to generate
-# the OEM record (VINI is a record in IBM IPZ VPD format) for FRU of type Board.
-# For all instances of the same FRU, the same config JSON will apply.
+// This is the master config file for generating PLDM FRU records from the D-Bus
+// inventory objects. "service" is the name of D-Bus service hosting the
+// inventory D-Bus objects, "root_path" is the root path for all the inventory
+// D-Bus objects and "entities" section specifies the type of FRU's for which
+// FRU records are created in the FRU table. FRU Record Set PDR and Entity
+// Association PDR are generated for matching FRU. In this example, PLDM FRU
+// records will be created for all FRU's of type Board and CPU. The "entity_type"
+// field is the PLDM entity type for Board and CPU. For each FRU type,
+// corresponding config JSON's are needed for each record. In the example
+// directory, Board_General.json is the config to generate the General FRU
+// record for FRU of type Board and Board_VINI.json is the config to generate
+// the OEM record (VINI is a record in IBM IPZ VPD format) for FRU of type Board.
+// For all instances of the same FRU, the same config JSON will apply.
 {
     "service":"xyz.openbmc_project.Inventory.Manager",
     "root_path":"/xyz/openbmc_project/inventory",
diff --git a/libpldmresponder/examples/fru/host_frus.json b/libpldmresponder/examples/fru/host_frus.json
index 07107ff..d0348c1 100644
--- a/libpldmresponder/examples/fru/host_frus.json
+++ b/libpldmresponder/examples/fru/host_frus.json
@@ -1,11 +1,11 @@
 {
         "entities":[
             {
-                # Entity Type 64 from the host has ...
+                // Entity Type 64 from the host has ...
                 "entity_type" : 64,
                 "parent":
                      {
-                        # ... entity type 100 and instance 1 on the BMC as parent
+                        // ... entity type 100 and instance 1 on the BMC as parent
                         "entity_type" : 100,
                         "entity_instance" : 1
                      }
diff --git a/libpldmresponder/examples/pdr/sensor_pdr.json b/libpldmresponder/examples/pdr/sensor_pdr.json
index 5b53580..1d0489a 100644
--- a/libpldmresponder/examples/pdr/sensor_pdr.json
+++ b/libpldmresponder/examples/pdr/sensor_pdr.json
@@ -1,14 +1,14 @@
-# This JSON is tied with BMC's PDRs. Each entry is used to identify a group of
-# composite sensors.
+// This JSON is tied with BMC's PDRs. Each entry is used to identify a group of
+// composite sensors.
 {
   "sensorPDRs": [
     {
-      # StateSensorPDR
-      # Each sensor in each group of composite sensors has a separate entry and the
-      # supported event states, up to eight.
-      # The "dbus" section contains information about the corresponding D-Bus
-      # property for the sensor and "property_values" are the D-Bus property values
-      # for each corresponding entry in the "states".
+      // StateSensorPDR
+      // Each sensor in each group of composite sensors has a separate entry and the
+      // supported event states, up to eight.
+      // The "dbus" section contains information about the corresponding D-Bus
+      // property for the sensor and "property_values" are the D-Bus property values
+      // for each corresponding entry in the "states".
       "pdrType": 4,
       "entries": [
         {
@@ -61,4 +61,4 @@
       ]
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/libpldmresponder/test/pdr_jsons/state_sensor/malformed/sensor_pdr.json b/libpldmresponder/test/pdr_jsons/state_sensor/malformed/sensor_pdr.json
index 6d5a941..09654e0 100644
--- a/libpldmresponder/test/pdr_jsons/state_sensor/malformed/sensor_pdr.json
+++ b/libpldmresponder/test/pdr_jsons/state_sensor/malformed/sensor_pdr.json
@@ -1,14 +1,14 @@
-# This JSON is tied with BMC's PDRs. Each entry is used to identify a group of
-# composite sensors.
+// This JSON is tied with BMC's PDRs. Each entry is used to identify a group of
+// composite sensors.
 {
   "sensorPDRs": [
     {
-      # StateSensorPDR
-      # Each sensor in each group of composite sensors has a separate entry and the
-      # supported event states, up to eight.
-      # The "dbus" section contains information about the corresponding D-Bus
-      # property for the sensor and "property_values" are the D-Bus property values
-      # for each corresponding entry in the "states".
+      // StateSensorPDR
+      // Each sensor in each group of composite sensors has a separate entry and the
+      // supported event states, up to eight.
+      // The "dbus" section contains information about the corresponding D-Bus
+      // property for the sensor and "property_values" are the D-Bus property values
+      // for each corresponding entry in the "states".
       "pdrType": 4
       "entries": [
         {
@@ -41,4 +41,4 @@
       ]
     }
   ]
-}
\ No newline at end of file
+}