web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom object to JSON ...
Power Automate
Unanswered

Custom object to JSON change value 1234 to 1234.0

(2) ShareShare
ReportReport
Posted on by 4

Hi all, i encountered this issue when converting custom object to json.
The value in object is 1970

alexlee985_0-1644941182967.png

However once i convert it to json (as i need json for Webservice call), the value 1970 become 1970.0

alexlee985_1-1644941268616.png

My step is

alexlee985_2-1644941315766.png

Any help to resolve this is very appreciated.

 

I have the same question (0)
  • rb0 Profile Picture
    9 on at

    hi @alexlee985 
    I ran into the same problem. Were you able to find a solution? Digging the internet did not help so far.

    I even tried to use the "Convert text to number" action in hopes that it would pick it up as interger, but no avail. I it really the "Convert custom object to JSON" action that is messing it up. The docs state that the returned value is Text. But why it also converts integer to decimal. So weird. Maybe I'm missing something.

  • rb0 Profile Picture
    9 on at

    I believe this is a bug, PAD version I am using is 2.18.146.22083

    To reproduce follow these steps:

    SET DataTable TO { ^['ProductID', 'ProductName'], [1, 'FirstProduct'], [2, 'SecondProduct'] }
    SET CustomObject TO {{ }}
    SET CustomObject['Table'] TO DataTable
    Variables.ConvertCustomObjectToJson CustomObject: CustomObject Json=> CustomObjectAsJson

     

    Resulting JSON:

    {"Table":[{"ProductID":1.0,"ProductName":"FirstProduct"},{"ProductID":2.0,"ProductName":"SecondProduct"}]}

     

    Hi @John_Mavridis ,
    Hope you are doing well!
    tagging you here as you replied on another JSON related issue. Could you please review this thread and inform if this is a bug. For some reason integer values become decimal when exporting to JSON. 

    Thank you in advance,

    Rob

  • rb0 Profile Picture
    9 on at

    too bad this is not resolved in 2.21.244.22174 ☹️

    especially considering the fact that the new feature of json editor is added.

    disappointing.

  • rb0 Profile Picture
    9 on at

    This is still an issue in 2.28.135.23016☹️

  • Cristpb Profile Picture
    23 on at

    No fixing this error yet, right? version: 2.30.109.23075

  • lingdongxinling Profile Picture
    10 on at

    Yes, I use the same version like yours, the same error.

  • Riyaz_riz11 Profile Picture
    3,844 Super User 2025 Season 2 on at

    Hi @rb0 @alexlee985 @lingdongxinling 

    Try using this 

    Ahammad_Riyaz_0-1681895897778.png

     

    Regards

    Ahammad Riyaz

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

  • HellitonWoo Profile Picture
    39 on at

    I'm also facing the same issue! 

     

    My walk-around is to replace the decimal value by the source value.

    Simply replace the "number with decimal" with "number without decimal" from the JSON string.

     

    One thing I noticed is that we can't use ".0" in the "Text to find" field, as it is automatically "corrected" to "0.0".

     

    In editing:

    HellitonWoo_0-1698931514728.png

    After saving:

    HellitonWoo_1-1698931561859.png

     

     

  • orkan Profile Picture
    6 on at

    Hi,

    Have you find any solution for this problem ? I can't make also the http request successfully due to this reason. 

  • MichaelSchweer1 Profile Picture
    9 on at

    Still not fixed. It's been more than 2 years since the initial bug report.

     

    @HellitonWoo workaround is your best bet. Unless your JSON contains ".0" in other places. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard