Facts are not Coming in JSON Format when Query is done via Foreman APIs

Hi All,

I am using two Puppet Servers having version 4.7.0 (Foreman 1.13) and I see
that facts values using Foreman API (/v2/fact_values) are coming in one of
the servers in JSON format as follows.

"networking": "{"dhcp"=>"10.65.168.11", "domain"=>"
sdcorp.global.sandisk.com", "fqdn"=>"
Puppetest12345.sdcorp.global.sandisk.com
<http://puppetest12345.sdcorp.global.sandisk.com/>&quot;,
&quot;hostname&quot;=>&quot;Puppetest12345&quot;, &quot;interfaces&quot;=>{&quot;Local Area Connection
2&quot;=>{&quot;bindings&quot;=>[{&quot;address&quot;=>&quot;10.65.168.150&quot;,
&quot;netmask&quot;=>&quot;255.255.248.0&quot;, &quot;network&quot;=>&quot;10.65.168.0&quot;}],
&quot;bindings6&quot;=>[{&quot;address&quot;=>&quot;fe80::b45c:17f7:b3c1:fdd2%13&quot;,
&quot;netmask&quot;=>&quot;ffff:ffff:ffff:ffff::&quot;, &quot;network&quot;=>&quot;fe80::%13&quot;}],
&quot;dhcp&quot;=>&quot;10.65.168.11&quot;, &quot;ip&quot;=>&quot;10.65.168.150&quot;,
&quot;ip6&quot;=>&quot;fe80::b45c:17f7:b3c1:fdd2%13&quot;, &quot;mac&quot;=>&quot;30:5A:3A:4B:06:52&quot;,
&quot;mtu&quot;=>1500, &quot;netmask&quot;=>&quot;255.255.248.0&quot;,
&quot;netmask6&quot;=>&quot;ffff:ffff:ffff:ffff::&quot;, &quot;network&quot;=>&quot;10.65.168.0&quot;,
&quot;network6&quot;=>&quot;fe80::%13&quot;}}, &quot;ip&quot;=>&quot;10.65.168.150&quot;,
&quot;ip6&quot;=>&quot;fe80::b45c:17f7:b3c1:fdd2%13&quot;, &quot;mac&quot;=>&quot;30:5A:3A:4B:06:52&quot;,
&quot;mtu&quot;=>1500, &quot;netmask&quot;=>&quot;255.255.248.0&quot;,
&quot;netmask6&quot;=>&quot;ffff:ffff:ffff:ffff::&quot;, &quot;network&quot;=>&quot;10.65.168.0&quot;,
&quot;network6&quot;=>&quot;fe80::%13&quot;, &quot;primary&quot;=>&quot;Local Area Connection 2&quot;}",

In the other hand, in another Puppet server the facts values are are coming
in different format.

 &quot;networking::interfaces::Ethernet::dhcp&quot;: &quot;10.65.250.10&quot;,
  &quot;networking::interfaces::Ethernet::ip&quot;: &quot;10.65.250.14&quot;,
  &quot;ipaddress&quot;: &quot;10.65.250.14&quot;,
  &quot;networking::ip&quot;: &quot;10.65.250.14&quot;,
  &quot;ipaddress_Ethernet&quot;: &quot;10.65.250.14&quot;,
  &quot;memory::system::used&quot;: &quot;1.08 GiB&quot;,
  &quot;timestamp&quot;: &quot;11/05/2016 07:46:56&quot;,
  &quot;memory::system::used_bytes&quot;: &quot;1157337088&quot;,

Can some please explain what that above format is and is there any
Puppet/Foreman configuration I can set to get O/P in JSON format as the
first Puppet server provides?

Alternately if that is not possible please let me know how can I convert
this format to JSON.

Any help is appreciated.

Regards
Amrit