Question: I would like to get information like below,

```
SiteCollection
--- RootSite
------Site1
------------Site1.1
--------------------List1
------------Site1.2
------------Site1.3
------Site2
------Site3
------Site4

```

I want to get this information as a JSON, I know I can get it as a csv using following PS code,

```
$allwebapps = Get-SPWebApplication | select url foreach ($webapp in $allwebapps) {
    Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, URL, ID, ParentWebID | Export-CSV “C:\Users\A\Desktop\Structure.csv”
-NoTypeInformation }

```

I am not sure if there's anything out there already or I can change this script

Answer: 
You can try increasing `maxJsonLength` in the web.config:

```
<configuration>
 <system.web.extensions>
   <scripting>
    <webServices>
      <jsonSerialization maxJsonLength="10000000"/>
    </webServices>
  </scripting>
 </system.web.extensions>
</configuration>

```
In SharePointDesigner we created 3 forms realted with the list (New, Edit,Display).
These forms are the default ones.

Now we can open, edit and create items.