You have to quote all your property names and remove the // comments.


Jacob Barrett 
Manager 
GemFire Advanced Customer Engineering (ACE) 
Pivotal

[email protected] 
503-533-3763

For immediate support please contact Pivotal Support at 
http://support.pivotal.io/

On Mon, Aug 31, 2015 at 11:57 AM, Anthony Baker <[email protected]> wrote:

> Wes,
> That doesn’t look like valid json to me…try http://jsonlint.com.
> Anthony
>> On Aug 31, 2015, at 11:43 AM, Real Wes Williams <[email protected]> 
>> wrote:
>> 
>> 
>> 
>> I’m creating regions dynamically using JSON… at least that’s the goal. The 
>> JSONFormatter blows up when trying to convert the JSON fragment below to a 
>> PDXInstance in preparation to be read by Region Attributes. I am referring 
>> to the AbstractBaseController>convert(String son) method.  Does the json 
>> fragment need to be in an idiosyncratic format before being converted to PDX?
>> 
>> INFO: com.gemstone.gemfire.pdx.JSONFormatterException: Could not parse JSON 
>> document 
>> 
>>  protected PdxInstance convert(final String json){
>>    try{
>>      return (StringUtils.hasText(json) ? JSONFormatter.fromJSON(json) : 
>> null);
>>    }catch(JSONFormatterException jpe){
>>      throw new MalformedJsonException("Json doc specified is either not 
>> supported or invalid!", jpe);
>>    }
>>  }
>> 
>> 
>> {
>>  server: {
>>    dataPolicy: "PERSISTENT_PARTITION",
>>    partitionAttributes: {
>>      redundantCopies: 1
>>    },
>>    diskStoreName: "gemfire-store",
>>    indexUpdateType: "synchronous",
>>    //diskSynchronous: true,
>>    statisticsEnabled: true,
>>    "evictionAttributes": {
>>      "lruHeapPercentage": {
>>        "action": "overflow-to-disk"
>>      }
>>    }
>>  },
>>  client: {
>>    type: "PROXY",
>>    poolName: "publisher"
>>  }
>> }

Reply via email to