Thanks.  I'm generating regions dynamically now like a madman.

*Wes Williams | Pivotal Sr. **Data Engineer*
781.606.0325
http://pivotal.io/big-data/pivotal-gemfire

On Mon, Aug 31, 2015 at 4:04 PM, Jacob Barrett <jbarr...@pivotal.io> wrote:

> You have to quote all your property names and remove the // comments.
>
>
>
> Jacob Barrett
> Manager
> GemFire Advanced Customer Engineering (ACE)
> Pivotal
>
> jbarr...@pivotal.io
> 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 <aba...@pivotal.io> 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 <thereal...@outlook.com>
> 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