Upload Locations
Welcome to the user guide for the Upload Locations page! This page allows you to easily add new locations to the system using a simple JSON file.
Overview
The Upload Locations page helps you manage counties, municipalities, BliksundWeb places, and locations in a structured way. You can upload a JSON file, review or edit its content, and save it to add any missing locations to the database.
Page Features
- 
JSON Editor\nView and edit the locations data in a user-friendly JSON editor.
[Insert screenshot of the JSON editor here]
 - 
Upload Button\nClick the "Upload" button to select and upload a JSON file from your computer. The content of the file will appear in the JSON editor.
[Insert screenshot showing the upload process here]
 - 
Save Button\nAfter reviewing or editing the JSON, click "Save" to validate the content and start the insertion. Only new locations will be added—existing entries will not be changed or removed.
[Insert screenshot of the Save button and confirmation here]
 
How to Use
- Prepare Your JSON File
- The file should contain a list of counties, each with their municipalities, BliksundWeb places, and locations.
 - See the example below for the correct format.
 
 - Upload the File
- Click the "Upload" button.
 - Select your JSON file.
 - The content will appear in the editor for you to review.
 
 - Review or Edit
- Make any changes directly in the editor if needed.
 
 - Save
- Click "Save" to validate and save the data.
 - The system will only add new entries; it will not update or delete anything already in the database.
 
 
Understanding the JSON Structure
The JSON file is organized in four levels:
- County
- Top-level object.
 - Has a 
Valueproperty (the county name). - Contains a 
Childrenarray of municipalities. 
 - Municipality
- Each item in the county's 
Childrenarray. - Has a 
Valueproperty (the municipality name). - Contains a 
Childrenarray of BliksundWeb places. 
 - Each item in the county's 
 - BliksundWeb Place
- Each item in the municipality's 
Childrenarray. - Has a 
Valueproperty (the place name). - Contains a 
Locationsarray of locations (or, if missing, a default location will be created). 
 - Each item in the municipality's 
 - Location
- Each item in the 
Locationsarray. - Every location must have a 
Nameproperty (the location name). - Optionally, a location can also have a 
Placeobject with extended information. - Example:
- Simple: 
{ "Name": "Location1" } - Detailed: 
{ "Name": "Location2", "Place": { ... } } 
 - Simple: 
 
 - Each item in the 
 
Place Object (Extended Location Information)
If you want to provide more details for a location, use the Place property. The Place object can include:
Address: The street address of the location.PostalCode: The postal code.City: The city name.Coordinate: The geographic coordinates (see below).Description: A description of the place.Department: The department associated with the place.
Coordinate Object
The Coordinate property inside Place lets you specify the latitude and longitude:
Latitude: The latitude value (number).Longitude: The longitude value (number).
Examples:
Simple location:
{
  "Name": "Location1"
}
Location with extended place information:
{
  "Name": "Location2",
  "Place": {
    "Address": "Example Street 1",
    "PostalCode": "1234",
    "City": "Oslo",
    "Coordinate": {
      "Latitude": 59.9111,
      "Longitude": 10.7528
    },
    "Description": "Main office",
    "Department": "Administration"
  }
}
Full structure example:
[
  {
    "Value": "Oslo",
    "Children": [
      {
        "Value": "Oslo Kommune",
        "Children": [
          {
            "Value": "BliksundWebPlace1",
            "Locations": [
              { "Name": "Location1" },
              {
                "Name": "Location2",
                "Place": {
                  "Address": "Example Street 1",
                  "PostalCode": "1234",
                  "City": "Oslo",
                  "Coordinate": {
                    "Latitude": 59.9111,
                    "Longitude": 10.7528
                  },
                  "Description": "Main office",
                  "Department": "Administration"
                }
              }
            ]
          }
        ]
      }
    ]
  }
]
- You can add as many counties, municipalities, places, and locations as needed.
 - If a municipality or place does not have any children or locations, a default "Annet" (Other) entry will be created automatically.
 
Notes
- Only missing locations will be added. Existing data will not be changed or removed.
 - If you upload a file with locations that already exist, those entries will be ignored.
 
Screenshots
The new menu item

The file selected is not a JSON file

The file selected is empty or invalid structure

The file is uploaded successfully
