Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Data Exchange Definition for Json

Posted on by 670
Can anybody point me in the direction of a tutorial about configuring a Business Central Data Exchange Definition for importing Json data? I've created ones in the past to handle CSV data, but not Json.
This requirement is to work in conjunction with a Currency Exchange Rate Services set-up.
 
Here's the format I need to handle:-
 
{
    /disclaimer/: /Usage subject to terms: https://openexchangerates.org/terms/,
    /license/: https://openexchangerates.org/license/,
    /timestamp/: 1692266400,
    /base/: /USD/,
    /rates/:
    {
        /AED/: 3.67305,
        /AFN/: 84.67614,
        /ALL/: 96.873903,
        /CAD/: 1.352029,
        /CHF/: 0.879243,
        /EUR/: 0.919645,
        /GBP/: 0.786105,
        /USD/: 1
    }
}
 
Thanks in advance for any help.
Categories:
  • Nick Webb Profile Picture
    Nick Webb 670 on at
    Data Exchange Definition for Json
    Hi Ram,
     
    Thanks for your response. Yes, I've seen all 3 of those links before:
     
    'Set Up Data Exchange Definitions' is too generic. It only mentions Json once in the whole page. I'm after a web-page that is specific to handling Json. For instance, what should the various Codeunits be set to in the Data Exchange Definition page?
     
    Also, how do you map the various nodes/tags in the incoming Json to the Line Definitions, Column Definitions & Field Mapping? Note, in my sample Json, the rates tag is an array of key/value pairs (Currency-Code & Rate). How is that configured?
    There's also Field Mapping in the Currency Exch. Rate Service page. Where should the settings be assigned? In the Currency Exch. Rate Service page, the Data Exchange Definition page, both, other?
     
    I'm looking for a tutorial page that first shows a sample bit of Json data and then describes how to configure the various BC pages to handle it?
     
    'Update Currency Exchange Rates' will come into play once I've handled the Json.
     
    'Getting exchange rates from a JSON web service in Business Central' is very useful, but it completely bypasses the above 2 methods. It's a custom extension solution. My question is: can it be achieved in the BC GUI without an extension?
     
    Regards
    Nick
  • Suggested answer
    Ram Pranav Profile Picture
    Ram Pranav 50 on at
    Data Exchange Definition for Json
  • Nick Webb Profile Picture
    Nick Webb 670 on at
    Data Exchange Definition for Json
    Apologies. The web-site mangled the Json. Here's another try:
     
    {
    	"disclaimer": "Usage subject to terms: https://openexchangerates.org/terms",
    	"license": "https://openexchangerates.org/license",
    	"timestamp": 1692266400,
    	"base": "USD",
    	"rates":
    	{
    		"AED": 3.67305,
    		"AFN": 84.67614,
    		"ALL": 96.873903,
    		"CAD": 1.352029,
    		"CHF": 0.879243,
    		"GBP": 0.786105,
    		"USD": 1
    	}
    }
     
     
     

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans