title: how to parse a json text file into BasicDBobject
body: <pre><code> public void process(FeedExchange exchange) throws Exception {
          List&lt;BasicDBObject&gt; collectionAttributes = (List&lt;BasicDBObject&gt;) exchange.getInput();
          for (BasicDBObject collectionAttribute : collectionAttributes) {
            if (collectionAttribute.get(&quot;name&quot;) != null) {
              String attributeName = collectionAttribute.getString(&quot;name&quot;);
              if (attributeName.equals(JobParamConstants.DEFAULT_LOCALE) || attributeName
                .equals(JobParamConstants.APPLICABLE_LOCALES)) {
                exchange.setProperty(attributeName, collectionAttribute.getString(&quot;_id&quot;));
              }
            }
  </code></pre>
  <p>hi i need to write junit testcase for above program..so i want to pass input to collectionAttributes.my input json is GetCatalogCollectionResponse.json</p>
  <pre><code>{
  &quot;properties&quot;:[{
  &quot;attributeId&quot;:&quot;123&quot;,
  &quot;value&quot;:&quot;345&quot;
  },
  {
  &quot;attributeId&quot;:&quot;2345&quot;,
  &quot;value&quot;:&quot;567&quot;
  }]
  }
  </code></pre>
  <p>i want to parse this json to collectionAttributes in mongodb.i tried the following  code</p>
  <pre><code>BasicDBObject DBObject = new BasicDBObject();
  DBObject.parse(GetCatalogCollectionResponse.json);
  </code></pre>
  <p>but i got an error.could you help me i am beginner to java,any help would be appreciated..</p>