{"action":"created","issue":{"url":"https://api.github.com/repos/arangodb/velocypack/issues/8","repository_url":"https://api.github.com/repos/arangodb/velocypack","labels_url":"https://api.github.com/repos/arangodb/velocypack/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/arangodb/velocypack/issues/8/comments","events_url":"https://api.github.com/repos/arangodb/velocypack/issues/8/events","html_url":"https://github.com/arangodb/velocypack/issues/8","id":134366331,"number":8,"title":"Additional value types?","user":{"login":"Simran-B","id":7819991,"avatar_url":"https://avatars.githubusercontent.com/u/7819991?v=3","gravatar_id":"","url":"https://api.github.com/users/Simran-B","html_url":"https://github.com/Simran-B","followers_url":"https://api.github.com/users/Simran-B/followers","following_url":"https://api.github.com/users/Simran-B/following{/other_user}","gists_url":"https://api.github.com/users/Simran-B/gists{/gist_id}","starred_url":"https://api.github.com/users/Simran-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simran-B/subscriptions","organizations_url":"https://api.github.com/users/Simran-B/orgs","repos_url":"https://api.github.com/users/Simran-B/repos","events_url":"https://api.github.com/users/Simran-B/events{/privacy}","received_events_url":"https://api.github.com/users/Simran-B/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-17T18:52:03Z","updated_at":"2016-02-17T23:05:39Z","closed_at":null,"body":"A rather random list of things that came to my mind:\r\n\r\n- sets (ordered/unordered), unique values only\r\n- bags (unordered), as opposed to arrays, which are ordered bags (non-unique and ordered)\r\n- sorted variants of sets and bags (?)\r\n- enums (symbols, bitfields, ...)\r\n- union structs (?)\r\n- NaN (invalid number) / N/A (known to be missing its value) / undefined\r\n- UTF-16 encoded text, which may use up less memory/space/bandwidth for certain content (Chinese text for instance), but add a cost for (de-)serialization, because JSON requires text encoding to be UTF-8"},"comment":{"url":"https://api.github.com/repos/arangodb/velocypack/issues/comments/185450090","html_url":"https://github.com/arangodb/velocypack/issues/8#issuecomment-185450090","issue_url":"https://api.github.com/repos/arangodb/velocypack/issues/8","id":185450090,"user":{"login":"Simran-B","id":7819991,"avatar_url":"https://avatars.githubusercontent.com/u/7819991?v=3","gravatar_id":"","url":"https://api.github.com/users/Simran-B","html_url":"https://github.com/Simran-B","followers_url":"https://api.github.com/users/Simran-B/followers","following_url":"https://api.github.com/users/Simran-B/following{/other_user}","gists_url":"https://api.github.com/users/Simran-B/gists{/gist_id}","starred_url":"https://api.github.com/users/Simran-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simran-B/subscriptions","organizations_url":"https://api.github.com/users/Simran-B/orgs","repos_url":"https://api.github.com/users/Simran-B/repos","events_url":"https://api.github.com/users/Simran-B/events{/privacy}","received_events_url":"https://api.github.com/users/Simran-B/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T23:05:39Z","updated_at":"2016-02-17T23:05:39Z","body":"Thanks for the detailed reasoning! More types would mean more work indeed and I think pretty much everything can be modeled with already specified types (fuzzy dates being my personal favorite).\r\n\r\nSorted sets seemed interesting to me, in particular in imports, because the type could signal the DBMS that the data doesn't need to sorted after import (because it already is) and that no duplicate values are to be expected. But that's not very useful I guess, and it even moves structural concerns to the data type level, which belong on the document level to stay schema-free at the DB level (like with enums).\r\n\r\nI did not know IEEE double could handle NaN and Infinity. Doesn't it also support +0 and -0?\r\n\r\nAbout unions: it's more about how you access the data, not how it's stored actually... I realize that now. I think you would use a binary block of data on the DB level and interpret it in different ways on the application level if necessary.\r\n\r\nRegarding UTF-16: non-ansi people probably form the majority, but yeah, blob is always an option and the space savings might not be that large after all - because characters from the 1-byte range (whitespace, inter punctuation, digits, ...) are frequently used in texts with mostly 2-4 byte characters and they may weigh out the differences.\r\n\r\nThat said, there's probably no type really missing in the VPack specs!"}}