data.json

Commas still don't work properly in all cases for removed values via value-fn

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

DSON-7 fixes the problem with printing JSON with extra commas, but only as long as the last item is actually printable (the test doesn't appear to demonstrate this, but the keys are iterated in hash order, not insertion order). If the last item's no good, we still have a problem.

The best way to handle this without trying to precalculate value-fn for the next value (in case it's not needed) is to insert the comma BEFORE we print the current value, but only if it's not the first thing to be printed.

Activity

Hide
Andy Fingerhut added a comment -

Doh! Patch djson-11-fix-comma-printing-patch-v1.txt dated May 17 2013 should really fix things, including changing the test to exhibit the problem (before this fix).

Show
Andy Fingerhut added a comment - Doh! Patch djson-11-fix-comma-printing-patch-v1.txt dated May 17 2013 should really fix things, including changing the test to exhibit the problem (before this fix).
Andy Fingerhut made changes -
Field Original Value New Value
Attachment djson-11-fix-comma-printing-patch-v1.txt [ 11993 ]
Hide
Stuart Sierra added a comment -
Show
Stuart Sierra added a comment - Patch applied.
Stuart Sierra made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Hide
Stuart Sierra added a comment -

Marking old issues as 'closed'

Show
Stuart Sierra added a comment - Marking old issues as 'closed'
Stuart Sierra made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: