<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Order of fields in json java in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90585#M18802</link>
    <description>&lt;P&gt;It should honor the fields specified in the query string after the &lt;CODE&gt;table&lt;/CODE&gt; keyword. If possible, try to run the query through cURL and see whether you get the desired results. Nonetheless, you can pass the list of fields explicitly to the &lt;CODE&gt;getResults&lt;/CODE&gt; method on the job, once its done.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;JobResultsArgs resultArgs = new JobResultsArgs();&lt;BR /&gt;
resultArgs.setFieldList(new String[] {"field1", "field2"});&lt;BR /&gt;
InputStream results = job.getResults(resultArgs);&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2013 14:16:21 GMT</pubDate>
    <dc:creator>Neeraj_Luthra</dc:creator>
    <dc:date>2013-04-17T14:16:21Z</dc:date>
    <item>
      <title>Order of fields in json java</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90582#M18799</link>
      <description>&lt;P&gt;For java sdk, output mode as json, I am getting fields sent from splunk and their values as json. But how ever is the order of fields in the table statement &lt;BR /&gt;
| table field1, field2&lt;BR /&gt;
or&lt;BR /&gt;
| table field2, field1&lt;/P&gt;

&lt;P&gt;The order of fields I get in the java side is the same - and i need the order the same way as I has specified in the query after table &lt;BR /&gt;
What should be done to get this way&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2013 12:18:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90582#M18799</guid>
      <dc:creator>1234testtest</dc:creator>
      <dc:date>2013-04-11T12:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Order of fields in json java</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90583#M18800</link>
      <description>&lt;P&gt;I am not sure what the problem is. Can you clarify further? Is the order in Java different from what your query is specifying after the &lt;CODE&gt;table&lt;/CODE&gt; keyword?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 04:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90583#M18800</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-04-12T04:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Order of fields in json java</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90584#M18801</link>
      <description>&lt;P&gt;Yes the order in java is different from what I specify in query after table keyword. Also FYI I am using output mode as json in java side to get details from plunk&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 00:40:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90584#M18801</guid>
      <dc:creator>1234testtest</dc:creator>
      <dc:date>2013-04-17T00:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Order of fields in json java</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90585#M18802</link>
      <description>&lt;P&gt;It should honor the fields specified in the query string after the &lt;CODE&gt;table&lt;/CODE&gt; keyword. If possible, try to run the query through cURL and see whether you get the desired results. Nonetheless, you can pass the list of fields explicitly to the &lt;CODE&gt;getResults&lt;/CODE&gt; method on the job, once its done.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;JobResultsArgs resultArgs = new JobResultsArgs();&lt;BR /&gt;
resultArgs.setFieldList(new String[] {"field1", "field2"});&lt;BR /&gt;
InputStream results = job.getResults(resultArgs);&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 14:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Order-of-fields-in-json-java/m-p/90585#M18802</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-04-17T14:16:21Z</dc:date>
    </item>
  </channel>
</rss>

