Altova XMLSpy 2024 Enterprise Edition

Inserting JSON Fragments

Home Prev Top Next

You can insert JSON fragments from other applications and web pages. These fragments can be inserted in one of two ways:

 

By using drag-and-drop to Text View or Grid View. If you drag-and-drop to Grid View, the intelligent information available in drag overlays can help you decide where to drop the fragment.

By using copy-and-paste to Text View or Grid View.

 

Example

The following example shows how a fragment can be added quickly and to the correct location in a JSON document.

 

1.The fragment that is highlighted below (from the JSON tutorial at w3schools.com) is selected. It is an array named cars.

JSONFragment

2.The screenshot below shows the Grid View of a JSON document containing a similar cars array. When the fragment from the web page is dragged to the already existing cars array, a drag overlay appears containing the information that the dragged JSON fragment will be dropped below the existing array as a new array named cars.

JSONFragmentDraggedToGrid

3.When the fragment is dropped, it is placed exactly where it is wanted (screenshot below).

JSONFragmentDropped

 

© 2017-2023 Altova GmbH