The Store::populateJSONArray() method has been removed. Look at the new
ItemFactory methods for creating JSON items.

** Changed in: zorba
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/928710

Title:
  Populating JSON array requires direct store manipulation

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  New bug description:
  The only way to create a JSON array item with members is to first create the 
item, then populate it by manipulating the store using 
Store::populateJSONArray(). This seems like a bad API as only update primitives 
should be actually manipulating the store. (The way you create a JSON object 
with pairs is similar - you create the JSONObject item first, then "copy" pairs 
into it. This "copy" method also seems problematic as it can be done at any 
time, and really should only be used by update primitives.)

  
  Original bug description:
  If you are creating JSON items via the store API, the only way to add members 
to an array is to use the "no-copy copy()" trick, calling copy() on the member 
Item and passing a store::CopyMode with theDoCopy set to false.

  However, copy() is not implemented for Items of atomic types (at least
  integer and string), so there is no way at all to create a JSON array
  with strings or integers as members. This of course means there's no
  way to do it with the public C++ API either.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/928710/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to