Blue Prism Product

last person joined: 9 hours ago 

This community covers the core Blue Prism product.

Expand all | Collapse all

Utility-JSON issue

  • 1.  Utility-JSON issue

    Posted 01-01-2018 21:56
    Hi, While working with the VBO 'Utility-JSON', I used both the actions(viz. JSON to Collection,Collection to JSON) given in the VBO and found that if the input is a json containing some field as an array,and if I use both theses actions one after the other ie(using JSON to collection first and then using Collection to Json to the sample collection) the output JSON message doesn't match the input JSON message.The array fields get wrapped in another array.Also the entire JSON object gets wrapped as an array. Any solution to solve this issue?

  • 2.  I recommend that you see the…

    Posted 01-03-2018 18:12
    I recommend that you see the JSON utility we provide as a starting point example - it works very well with simple web services (I have used it several times myself) but if your web service requires a non-standard or embeded structure than you may have to take the code Blue Prism provides and expand it into something that works for you.

  • 3.  RE: I recommend that you see the…

    Posted 03-24-2020 11:31
    I'm facing the same issue currently - is there really no other way than programming the (de)serialization ​myself?

    Cheers Astrid

  • 4.  RE: I recommend that you see the…

    Posted 03-25-2020 10:54
    Can you provide an example JSON Astrid? If a bespoke code solution is your best option, I've found using the ExpandoObject relatively painless:

    Dim objJSON As Object = JsonConvert.DeserializeObject(Of ExpandoObject)(strJSON)
    For Each thing As Object In objJSON.Level1.Level2.things
       'Do stuff here

    John Carter
    Professional Services
    Blue Prism

  • 5.  RE: I recommend that you see the…

    Posted 03-25-2020 14:39

    Hi John,


    many thanks for your reply.


    While trying to prepare an example,  I noticed that the "JSON to Collection (skipping JArray)" action seems to resolve this issue.  

    The only "problem" is now, that the "Collection to JSON" function adds a set of square brackets around the JSON string which the REST service I'm calling doesn't like. So I need to remove them using a calculation stage. But the rest seems to work fine then.




  • 6.  RE: I recommend that you see the…

    Posted 04-06-2020 14:39
    Hi John,

    I was able to reproduce the issue now: 

    1. I'm using "JSON to Collection (skipping JArray)" with following JSON as Input and store the output in a collection "Coll":
    {"filterCriterias":[{"attribute":"originator","filterType":"EQUALS","value":"1234567"}],"sortCriteria":{"sortType" : "DESC","sortBy": "id"}}

    This returns a Collection containing 2 Collections, 1 row each.

    2. Then I'm using "Collection to JSON" with the collection "Coll" as Input which returns:

    So there are a few more square brackets in the resulting JSON string which my REST service doesn't accept. 

    I'd like to build a generic "search" action where users can pass the search criteria in one collection as input parameter.
    I'd then transform this Collection to a JSON and use this for the REST service call, but as described above, the "Collection to JSON" doesn't return a JSON which my REST service accepts...

    Any ideas?

    Cheers Astrid

  • 7.  RE: I recommend that you see the…

    Posted 04-07-2020 09:55
    ​Hi Astrid,

    a while ago I re-worked the complete Json Library. Maybe you can give it a try. see here: Using JSON VBO

    Tobias Arnold
    RPA Developer

  • 8.  RE: I recommend that you see the…

    Posted 04-08-2020 09:52
    Hi Tobias.

    many thanks for your reply.

    I actually found out that making my Input Collection a "Single Row" collection solves my problem with the surrounding square brackets which my REST service doesn't like.

    I still tried your object quickly but it didn't convert the collection in the collection correctly. Instead of the parameter name it gave me "JSONArray"...

    Thanks anyway!

    Cheers Astrid

  • 9.  RE: I recommend that you see the…

    Posted 4 days ago
    Hi Astrid! I went through the same problem, and with me team we could develop this solution in a Calculation

    Replace(Replace(Left(Right([Json Body], Len([Json Body])-1), Len([Json Body])-2), "[[{", "[{"), "}]]", "}]")

    I hope it works!

    Best wishes!

    Federico Mignone

  • 10.  RE: I recommend that you see the…

    Posted 4 days ago
    Thanks, Federico!

    I don't remember anymore actually how I solved it in the end, but I think it involved defining the result collection as "single row" (which requires to define the fields as well of course, so it's not super generic anymore but it worked for my process...).

    Cheers Astrid

  • 11.  RE: I recommend that you see the…

    Posted 2 days ago
    My global code from json vbo that should fix this issue:

    p.s. I think I also made it always treat datetime as local, because that is what I want most of the time.

    Andrey Kudinov
    Project Manager
    MobileTelesystems PJSC

  • 12.  RE: I recommend that you see the…

    Posted 2 days ago
    @Andrey Kudinov Thanks for shared!!​

    Emerson Ferreira
    Sr Business Analyst
    Avanade Brasil
    If my answer helped you? Mark as useful!

Welcome to the Blue Prism Product Community!

Whether you’re looking to manage a complex infrastructure, maintain security and compliance, bring new products to market faster, or gain operational speed and agility in an uncertain economy, Blue Prism delivers — with the flexibility you need to create the business you want. From deployment on-premise, through a cloud service provider or as SaaS, to a skillful and adaptable digital workforce that continually expands to meet your enterprise needs, you can gain enhanced operational insight and control while your people reclaim the time they need to focus on great work.

Product PageKnowledge BaseBlue Prism Training Offering


Blue Prism is intelligent automation — business-developed, no-code automation that pushes the boundaries of robotic process automation (RPA) to deliver value across any business process in a connected enterprise.

A combination of RPA with expanded cognitive and AI capabilities, Blue Prism is different than other automation technology on the market. With one Blue Prism license, you gain instant access to an already AI equipped digital workforce, along with the tools you need to build and delegate automations. Click here for more information on Blue Prism and Intelligent Automation.
To learn more about how Blue Prism can help your organization and how much it will cost to get started, please Contact our Sales department.
Blue Prism can be downloaded from our customer portal. If you would like to consume or download any material it is necessary to create an account on the Portal. Once you have registered, you can access the download options for Blue Prism here.
Yes! Installed on your own machine and supported by our training materials and product documentation, you can use all the features of the full enterprise product for free with our Blue Prism Trial – giving you the opportunity to learn the basics before moving to a full production implementation. Click here for more information and to download the trial.
Yes! You can access our known issue list for Blue Prism from our Support Portal.
Regardless of your industry, Blue Prism’s Digital Workforce can adhere to strict governance and compliance standards without limiting productivity. Click here for more information on how your industry can benefit from Blue Prism.