Project

General

Profile

Actions

Feature_ #1560

closed

Атрибуты узла в json хранятся в массиве, а не в объекте

Added by Alexey Demakov over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
07/26/2011
Due date:
% Done:

100%

Estimated time:
Published in build:
0.12.103

Description

Атрибуты узла в json файле хранятся в массиве:

{
"attributes": [ {
"key": "_type",
"type": "STRING",
"value": "Requirement"
}, {
"key": "_name",
"type": "STRING",
"value": "Общие требования к приобретению зарезервированной услуги"
}, {
"key": "_locations",
"type": "LIST",
"value": ["/Documents/JV_FS_v1.4.xhtml/a9701f8f-db0a-458b-94a0-257380a43094"]
}
],
"uuid": "191c2439-4981-4130-902b-6b0a9a1ddb27"
}

Это приводит к тому, что при изменении (даже нулевом) массив перезаписывается с изменением порядка:

{
"attributes": [ {
"key": "_type",
"type": "STRING",
"value": "Requirement"
}, {
"key": "_locations",
"type": "LIST",
"value": ["/Documents/JV_FS_v1.4.xhtml/a9701f8f-db0a-458b-94a0-257380a43094"]
}, {
"key": "_name",
"type": "STRING",
"value": "Общие требования к приобретению зарезервированной услуги"
}
],
"uuid": "191c2439-4981-4130-902b-6b0a9a1ddb27"
}

В результате появляются ложные изменения, которые мешают работать с svn.
Чтобы такого не происходило, надо поменять формат json файла (с сохранением обратной совместимости)

{
"attributes": {
"_type": {
"key": "_type",
"type": "STRING",
"value": "Requirement"
},
"_name": {
"key": "_name",
"type": "STRING",
"value": "Общие требования к приобретению зарезервированной услуги"
},
"_locations": {
"key": "_locations",
"type": "LIST",
"value": ["/Documents/JV_FS_v1.4.xhtml/a9701f8f-db0a-458b-94a0-257380a43094"]
}
},
"uuid": "191c2439-4981-4130-902b-6b0a9a1ddb27"
}

Actions #1

Updated by Alexey Khoroshilov about 13 years ago

  • Target version set to 0.12
Actions #2

Updated by Yuriy Shekochihin about 13 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2205.

Actions #3

Updated by Yuriy Shekochihin about 13 years ago

  • Published in build set to 0.12.103
Actions #4

Updated by Alexey Khoroshilov about 13 years ago

  • Assignee set to Alexey Demakov
Actions #5

Updated by Alexey Demakov about 13 years ago

  • Tracker changed from Feature_ to Feature
Actions #6

Updated by Alexey Demakov about 13 years ago

  • Status changed from Resolved to New
Actions #7

Updated by Alexey Demakov about 13 years ago

  • Tracker changed from Feature to Feature_
Actions #8

Updated by Alexey Demakov about 13 years ago

  • Status changed from New to Design
Actions #9

Updated by Alexey Demakov about 13 years ago

  • Status changed from Design to Development
Actions #10

Updated by Alexey Demakov about 13 years ago

  • Status changed from Development to Testing
Actions #11

Updated by Alexey Demakov about 13 years ago

  • Status changed from Testing to Verified
Actions #12

Updated by Alexey Khoroshilov about 13 years ago

  • Status changed from Verified to Closed
Actions

Also available in: Atom PDF