Generating JSON for PBCS REST API 1


Second blog post of the day!!!

You might be thinking what is this guy upto. Well let’s say that if I’m in a meeting and if it does interest me, my mind wanders here and there. Now when it wanders these are the outcome of those 🙂

Pete had this question about PBCS exportdataslice REST API command, it is funny that we (Tim Tow and me) were discussing about this yesterday and I find this question today http://www.network54.com/Forum/58296/thread/1473926464/last-1473963834/%28View+Thread+and+Replies%21%29

Now if you are working with PBCS REST API, you’ll have to deal with JSON. You can read about JSON all here. I’ll say that is the future long gone are the XML days.

Here is the first post on the productivity tools that I was talking about.

This one uses a nice plugin in Notepad ++ called JSTool (now how you want to read it is absolutely upto you ;))

image-026

I’m also an online link called http://www.objgen.com, ObjGen have 3 object generators and one among them is a JSON generator.

You can look at a demo and have a feel for it here

Now generating the JSON is pretty easy.

For example this is what I did to generate the JSON, you can use spaces/tabs to define complex values

image-027

Now you’ll have to do a little bit of formatting to make it pretty (java escaping is what you are seeing here “)

You can copy it and paste it in Notepad ++,

image-028

All I did was to find and replace

  • “” with “
  • “” with “
  • “[ ” with [“
  • ” ]” with “]
Now the file looks like this
image-030
You can now use JSTool to view the JSON in a hierarchical way and even format it.
image-031
Format it and use JSON Viewer to view it.
image-033
There you go, your JSON file created, formatted and viewed in a hierarchical way.
image-034

About Celvin Kattookaran

I’m an EPM Consultant, my primary focus is on Hyperion Planning and Essbase. Some of you from Hyperion Support team might recognize me or have seen my support articles, I was with the WebAnalysis Support Team. I'm an Independent Consultant with “Intekgrate Corporation” based out of Aurora office. I’m from God’s Own Country (Kerala, India), lived in all southern states of India, Istanbul and Johannesburg (and of course United States). I’m core gamer :) and an avid reader. I was awarded Oracle ACE Director for my contributions towards EPM community.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

One thought on “Generating JSON for PBCS REST API