Changed the behavior with respect to backslashes in the JSON so that
they are converted to the double-backslash escape that is the proper JSON syntax for backslashes, instead of being removed, which changes the name and can be confusing.
This commit is contained in:
parent
a16086d2e9
commit
bf671937b9
|
|
@ -138,7 +138,7 @@ proc netgen::convert_to_json {filename lvs_final} {
|
|||
foreach net $cktval {
|
||||
incr nidx
|
||||
puts $fjson " \["
|
||||
set netname [string map {"\\" ""} [lindex $net 0]]
|
||||
set netname [string map {"\\" "\\\\"} [lindex $net 0]]
|
||||
puts $fjson " \"$netname\","
|
||||
puts $fjson " \["
|
||||
set netconn [lindex $net 1]
|
||||
|
|
@ -169,7 +169,7 @@ proc netgen::convert_to_json {filename lvs_final} {
|
|||
foreach net $cktval {
|
||||
incr nidx
|
||||
puts $fjson " \["
|
||||
set netname [string map {"\\" ""} [lindex $net 0]]
|
||||
set netname [string map {"\\" "\\\\"} [lindex $net 0]]
|
||||
puts $fjson " \"$netname\","
|
||||
puts $fjson " \["
|
||||
set netconn [lindex $net 1]
|
||||
|
|
@ -221,7 +221,7 @@ proc netgen::convert_to_json {filename lvs_final} {
|
|||
foreach inst $cktval {
|
||||
incr iidx
|
||||
puts $fjson " \["
|
||||
set instname [string map {"\\" ""} [lindex $inst 0]]
|
||||
set instname [string map {"\\" "\\\\"} [lindex $inst 0]]
|
||||
puts $fjson " \"$instname\","
|
||||
puts $fjson " \["
|
||||
set instpins [lindex $inst 1]
|
||||
|
|
@ -250,7 +250,7 @@ proc netgen::convert_to_json {filename lvs_final} {
|
|||
foreach inst $cktval {
|
||||
incr iidx
|
||||
puts $fjson " \["
|
||||
set instname [string map {"\\" ""} [lindex $inst 0]]
|
||||
set instname [string map {"\\" "\\\\"} [lindex $inst 0]]
|
||||
puts $fjson " \"$instname\","
|
||||
puts $fjson " \["
|
||||
set instpins [lindex $inst 1]
|
||||
|
|
@ -292,8 +292,8 @@ proc netgen::convert_to_json {filename lvs_final} {
|
|||
foreach instance $value {
|
||||
incr pidx
|
||||
puts $fjson " \["
|
||||
set instnames [string map {"\\" ""} [lindex $instance 0]]
|
||||
set instname0 [string map {"\\" ""} [lindex $instnames 0]]
|
||||
set instnames [string map {"\\" "\\\\"} [lindex $instance 0]]
|
||||
set instname0 [string map {"\\" "\\\\"} [lindex $instnames 0]]
|
||||
puts $fjson " \["
|
||||
puts $fjson " \"${instname0}\","
|
||||
puts $fjson " \["
|
||||
|
|
@ -310,7 +310,7 @@ proc netgen::convert_to_json {filename lvs_final} {
|
|||
puts $fjson " \[\"${propname}\", \"${propval}\"\]"
|
||||
puts $fjson " \]"
|
||||
puts $fjson " \],"
|
||||
set instname1 [string map {"\\" ""} [lindex $instnames 1]]
|
||||
set instname1 [string map {"\\" "\\\\"} [lindex $instnames 1]]
|
||||
puts $fjson " \["
|
||||
puts $fjson " \"${instname1}\","
|
||||
puts $fjson " \["
|
||||
|
|
|
|||
Loading…
Reference in New Issue