DevScope Integration Toolkit: Flat File to JSON Schema Wizard for Visual Studio Code and Logic Apps

  • Sandro Pereira
  • Dec 3, 2026
  • 11 min read

In my previous post, I introduced the Flat File Schema Editor/Wizard that is part of the DevScope Integration Toolkit for Visual Studio Code. That post was all about XSD: how to take a CSV, delimited or positional sample and turn it into a proper flat file schema for BizTalk Server or Logic Apps Standard, without going back to Visual Studio and the BizTalk Developer Tools.

At the end of that post, I made a promise: flat file to JSON Schema support deserved its own dedicated post. Well, here it is!

Because let’s be honest. Flat files are not going away. ERPs, banks, mainframes, logistics partners and B2B exchanges keep sending us CSV, semicolon-delimited and fixed-width files every single day. But the world around those files changed. Logic Apps, Azure Functions, APIs, Service Bus messages, Copilot prompts… almost everything we build today speaks JSON.

So the question is simple: why do we still need to go through XML to get there?

📝 One-Minute Brief

The Flat File Wizard in the DevScope Integration Toolkit now has a second output mode: JSON + JSON Schema. From the same single screen, you paste or open a flat file sample, click Analyze Sample, adjust records and fields, and get three things back: a live JSON preview of the parsed file, the matching JSON Schema, and a Parse Report. No XSD, no XML intermediate step, no BizTalk tooling. Just flat file in, JSON out, inside Visual Studio Code.

The XML detour we all know too well

If you have worked with flat files in Logic Apps Standard, you probably know this pattern by heart:

  1. Create an XSD flat file schema (hopefully with a wizard, not by hand).
  2. Use the Flat File Decoding action to turn the flat file into XML.
  3. Convert that XML into JSON, using json(xml(...)), a Liquid template, XSLT or the Data Mapper.
  4. Finally, start doing what you actually wanted to do with the data.

It works. It has worked for years. But step 3 is where the surprises live:

  • Everything becomes a string. "Age": "1980" instead of "Age": 1980. The XML had no idea it was a number, so neither does the JSON.
  • Arrays that are not arrays. A file with a single record produces an object; a file with two records produces an array. Your downstream logic has to handle both. Every time.
  • Two contracts to maintain. The XSD describes the flat file, but your APIs, functions and consumers need a JSON Schema. So you end up maintaining both, and keeping them in sync by hand.

None of this is hard. It’s just friction. And friction adds up when you have dozens of partner files to onboard.

The XML intermediate made perfect sense in BizTalk, where XML was the native message format. In a JSON-first world, it’s a detour. So why not go straight to JSON?

From Flat File to JSON in one screen

If you read the previous post, you already know the layout. The wizard keeps everything on a single screen, organized in four numbered panels:

  1. Flat File Sample – paste your sample, open a file, or pick one from Load example…
  2. Schema Information – the global parsing rules (encoding, delimiters, headers, and so on).
  3. Records & Fields – the structure of each record and the data type of each field.
  4. Generated JSON – the live result: JSON preview, JSON Schema and Parse Report.

The only new thing at the top is the Output toggle. Switch from XSD Schema (BizTalk / Logic Apps) to JSON + JSON Schema, and the same wizard now produces JSON instead of XML.

Let’s use a simple semicolon-delimited file with a header line:

FirstName;LastName;Age;City;PostalCode;Country
John;Doe;1980;Porto;4000-001;Portugal
Mary;Smith;1975;Lisboa;1000-001;Portugal
Paul;Jones;1990;Braga;4700-001;Portugal
Anna;Brown;1985;Faro;8000-001;Portugal

(Yes, I know. The “Age” column contains birth years. Real-world flat files are full of these little gifts, so I kept it as is!)

Paste the sample, click Analyze Sample, and the wizard does the heavy lifting. Right below the sample, it tells you what it detected: 5 lines, 204 characters, parsed with {CR}{LF} line endings. In the Records & Fields panel, it has already inferred one repeating record with six semicolon-delimited fields, named them from the header line, and typed Age as an integer.

Flat FIle JSON Schema Wizard

Schema information: The rules of the game

The Schema Information panel is where you describe how the file behaves as a whole. Most of it will feel familiar to BizTalk developers, but a few options exist specifically for the JSON output.

SettingWhat it controlsIn our example
Root record nameThe name of the root of the documentRoot
Schema $idThe $id of the generated JSON Schema, so other schemas and tools can reference ithttps://contoso.com/schemas/flatfile.schema.json
EncodingThe character encoding of the flat fileUTF-8
Line (record) delimiterWhat separates one line from the next{CR}{LF} – Windows
Child orderWhere delimiters appear relative to the linesInfix – delimiter only between lines
Wrap character (quotes)Character used to wrap values that contain delimitersNone
Escape characterCharacter used to escape delimiters inside valuesnone
Header property nameThe JSON property that holds the header lineHeader
Header tagThe exact first line, when you want it validated as the header tag(empty)

And then there are the options I’m most happy about, because they solve real headaches:

  • First line is a column header (kept as a single string property) – the header line goes into the JSON as one string property, instead of being parsed into columns as if it were a data record. Notice the "Header" property at the top of the generated JSON.
  • First line is a column header (removed from the output) – the header is kept in the schema as the header tag, but does not appear in the JSON at all. Perfect when your consumers only care about the data.
  • Allow early termination – lets the last fields of a line be missing. Short positional lines and trailing optional columns stop being parsing errors.
  • Omit empty values – empty fields are left out of the JSON instead of showing up as empty strings.

Records & Fields: Real types, not just strings

The Records & Fields panel is where the JSON mode really shines.

On the left, you have the record tree. Use + Record and + Child to model header/detail/trailer files, nested structures, or anything in between. For each record, you define:

  • Record name – becomes the JSON property name (in our case, Record).
  • Tag identifier – for tagged records like HDR, CUS or TRL.
  • Occurrence – for example, Repeating (1..*). A repeating record is always a JSON array, even when the file has a single line. No more object-or-array guessing games.
  • Structure – Delimited or Positional.
  • Field delimiter – Semicolon, in our example.
  • After tag – where fields start relative to the tag.

On the right, you have the fields grid. For each field, you set the element name, the data type, an optional date/time format, and whether it’s optional. The Sample values column shows the actual values from your file for that position, so you can immediately see whether the inferred type makes sense. You can also reorder, insert and remove fields with the small arrows and buttons on each row.

And here is the key point: the data type you choose is the data type you get in the JSON. Age is an integer, so the output is "Age": 1980, not "Age": "1980". PostalCode values like 4000-001 stay strings, as they should. Your downstream Logic App, Function or API receives properly typed JSON from the very first step.

At the bottom right, the wizard keeps you honest: 6 fields · 4 sample lines matched. If your definition and your sample disagree, you’ll know right away.

Generated JSON: See it while you build it

The fourth panel updates live while you edit. Change a data type, rename a field, toggle a header option, and the result changes in front of you. It has three tabs.

JSON Preview

The parsed sample, exactly as your consumers will receive it:

{
  "Header": "FirstName;LastName;Age;City;PostalCode;Country",
  "Record": [
    {
      "FirstName": "John",
      "LastName": "Doe",
      "Age": 1980,
      "City": "Porto",
      "PostalCode": "4000-001",
      "Country": "Portugal"
    },
    {
      "FirstName": "Mary",
      "LastName": "Smith",
      "Age": 1975,
      "City": "Lisboa",
      "PostalCode": "1000-001",
      "Country": "Portugal"
    }
  ]
}

(Shortened to two records for readability.) Look at it: a header string, a real array of records, and a real number for Age. That’s the JSON you would otherwise build with a conversion step and some patience.

For bigger files, Collapse Records and Expand All help you navigate the preview.

JSON Schema + SASP

The JSON Schema that describes the output, using the $id you defined in the Schema Information panel. This is the contract you hand to the API team, use for validation, or plug into the Visual JSON Schema Editor that also ships with the toolkit.

And what about the SASP part? Alongside the standard JSON Schema keywords, the schema carries sasp:* keywords. These describe how to parse the flat file into this JSON shape: delimiters, record tags, positions, header handling, and so on. Standard JSON Schema validators simply ignore them, so the schema still works as a normal validation contract. If you come from BizTalk, think of them as the equivalent of the flat file annotations in an XSD schema: the same parsing instructions, just living in a JSON Schema instead of an XSD.

Flat FIle JSON Schema Wizard

Parse Report

Just like in the XSD mode, the Parse Report tells you how the sample was analyzed: what was detected, which lines matched which records, and where something did not fit. When a partner file fails to parse, this is the first place to look.

Flat FIle JSON Schema Wizard

Getting it out of the wizard

  • Copy – copies the current tab content to the clipboard.
  • Save JSON… – saves the output to your project.
  • Import Schema… – brings an existing schema back into the wizard, so you can keep evolving it visually instead of editing it by hand. Remember: editing after generation was one of the big improvements over the original BizTalk wizard, and that applies here too.

Same Wizard, two outputs

One thing I want to make clear: this is not a separate tool. It’s the same Flat File Wizard, with the same sample analysis, the same record and field model, and the same single-screen experience. You only choose what comes out of it.

XSD Schema (BizTalk / Logic Apps)JSON + JSON Schema
Schema producedXSD with flat file annotationsJSON Schema
Live previewXMLJSON
Data types in the outputDefined in the XSD, but values travel as XML textNative JSON types (numbers stay numbers)
Repeating recordsRepeating XML elementsAlways JSON arrays
Header lineHeader tag or header recordSingle string property or removed from output
Best fitBizTalk Server, Flat File Decoding in Logic AppsLogic Apps, Functions, APIs, anything JSON-first

So, which one should you use? It depends on where the data is going. If you’re migrating a BizTalk solution and want to keep your existing maps and XML-based processing, the XSD output is your friend. If you’re building something new, or your consumers speak JSON anyway, skip the detour and go straight to JSON.

The rest of the DevScope Integration Toolkit

The Flat File Wizard is only one piece of the toolkit. The Visual Studio Code extension also includes:

  • Visual Data Mapper
  • Visual XSD Editor
  • Visual JSON Schema Editor
  • Flat File Wizard (XSD and JSON)
  • Schema Validator
  • Workflow Diff
  • XPath Tester
  • Logic Apps JSON Path Tester
  • Schema to C#

The philosophy is the same across all of them: give integration developers the tooling they need, where they actually build integrations today.

Download and Installation

The DevScope Integration Toolkit is available on the Visual Studio Marketplace. Search for DevScope Integration Toolkit in the Extensions view of Visual Studio Code, or download it here:

Final Thoughts

Flat files are old. JSON is everywhere. And for too long, the only bridge between them was XML.

With the JSON + JSON Schema output, the Flat File Wizard lets you go straight from a CSV, delimited or positional file to typed JSON and a JSON Schema contract, all from Visual Studio Code, all on one screen. BizTalk developers will find the wizard familiar. Logic Apps and Azure developers will finally get flat file data in the format they actually want to work with.

Keep what worked. Improve what didn’t. Remove the detours. That’s what modernization should look like.

Give it a try, and let me know what you think!

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars LEGO set for my son. 

Thanks for Buying me a coffe

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top