Comments (13)
This was considered, but dismissed as most libraries used to convert JSON-like data to CBOR (and back) doesn't support it. I agree it would be better from an encoding point of view.
from eu-dcc-schema.
Agree, this does require manual conversion after the JSON is assembled by CBOR. Also, there is an open proposal for it.
These types of Unix Timestamps are not rare in JSON files, but it is not an ISO 8601.
It depends on how desperate you are for QR space. :)
from eu-dcc-schema.
It is also:
- not according to spec
- problematic cross-platform (Windows, for example, has a different epoch than *nix)
- already answered several times - I'll add it to the https://github.com/ehn-digital-green-development/ehn-dgc-schema/wiki/FAQ
from eu-dcc-schema.
Please see FAQ entry: https://github.com/ehn-digital-green-development/ehn-dgc-schema/wiki/FAQ#why-not-use-seconds-since-epoch-instead-of-the-iso-8601-format-for--date-and-date-time
from eu-dcc-schema.
@gabywh the second (different epoch times) and third points (size analysis) are incorrect.
For 2. The spec can define the Epoch it wants to use. The operating system has no say in this. This point is irrelevant.
For 3. Using integers, seconds, since Epoch offers gains of ~10%, which is more than what Base45 offers as compared to using Base32 (6%). How do I know? I actually implemented it.
I am also not sure why you are saying that "seconds since epoch" is a "string". It's not a string. It's a positive integer. Maybe that's why your analysis said they are the same?
from eu-dcc-schema.
For 2. The spec can define the Epoch it wants to use.
...is an option... which goes notoriously wrong in practice - and hence once of the motivating factors for ISO8601 to have been generated in the first place
The operating system has no say in this. This point is irrelevant.
Tell that to the operating system ;)
For 3. Using integers, seconds, since Epoch offers gains of ~10%, which is more than what Base45 offers as compared to using Base32 (6%). How do I know? I actually implemented it.
...
I am also not sure why you are saying that "seconds since epoch" is a "string". It's not a string. It's a positive integer.
Because integers as binary entities do not exist in JSON. JSON is string.
from eu-dcc-schema.
...is an option... which goes notoriously wrong in practice - and hence once of the motivating factors for ISO8601 to have been generated in the first place
Sure, but that is not what the FAQ is saying :)
Tell that to the operating system ;)
I don't get it. The implementer would just fix the epoch on the conversion code. It's literally a constant in the code.
Because integers as binary entities do not exist in JSON. JSON is string.
WHAT???? You literally have the number of doses as Integers in YOUR JSON. How can you say that "it doesn't exist"?
CBOR has integers as well.
Here's the full implementation of the HC1 with Date as Integers (HC1DInt): https://github.pathcheck.org/eu.dgc.html
Basically this: "HC1:" + Base45(zlib(cose(cbor(dateAsIntegers(json))))
It yields 7% on the COVID Test Payload. Can be better if you don't use seconds as a scale and go for days since epoch, for instance.
from eu-dcc-schema.
I think it is important to realize that the 2 dates of the HCERT CWT that encompasses the Schema already use the proposed seconds-since-epoch idea.
Looks like there are no problems between operating systems.
{
"dataType": "Map",
"value": [
[ 6, 1620154654 ], // <- This is a Date
[ 4, 1683172800 ], // <- This is a Date
[
-260,
{
"dataType": "Map",
"value": [
[
1,
{
"ver": "1.0.0",
"nam": {
"fn": "d'Arsøns - van Halen",
"gn": "François-Joan",
"fnt": "DARSONS<VAN<HALEN",
"gnt": "FRANCOIS<JOAN"
},
"dob": "2009-01-28", // <- This is a Date
"t": [
{
"tg": "840539006",
"tt": "LP217198-3",
"tr": "260415000",
"ma": "1232",
"sc": "2021-04-13T14:20:00+00:00", // <- This is a Date
"dr": "2021-04-13T14:40:01+00:00", // <- This is a Date
"tc": "GGD Fryslân, L-Heliconweg",
"co": "NL",
"is": "Ministry of VWS",
"ci": "urn:uvci:01:NL:GGD/81AAH16AZ"
}
]
}
]
]
}
]
]
}
from eu-dcc-schema.
One should keep in mind that the implementor notes states: "Parties validating payloads are strongly advised to follow the robustness principle and be liberal in what you accept from others.". If someone would encode date-time
content as CBOR timestamps, I'd expect them to be parsed correctly.
from eu-dcc-schema.
One should keep in mind that the implementor notes states: "Parties validating payloads are strongly advised to follow the robustness principle and be liberal in what you accept from others.". If someone would encode
date-time
content as CBOR timestamps, I'd expect them to be parsed correctly.
Sorry. no.
- The formally approved eHealthNetwork specification is very clear on this: format is ISO8601. Please implement accordingly.
- This is a mis-application of Postel's law. I will add examples to the FAQ.
from eu-dcc-schema.
We will definitely accept/verify both formats because:
- We already need to do for the cwt anyway
- Coding the two ways is super easy
- Knowing which one is which is also easy.
- CBOR is moving into this direction as well (copying protobuf).
- Space saved helps to make some use cases possible.
from eu-dcc-schema.
Feel free to accept and also create any format you care to choose - that is precisely the intention of the "business rules" stages in e.g. https://github.com/ehn-digital-green-development/ehn-dgc-schema/wiki/FAQ#what-do-the-typical-processing-stages-look-like-for
However, the date / date-time format fields in the vaccination, test and recovery certificates in themselves shall be ISO8601 according to the formally approved and published eHealthNetwork guidelines. If you want to put another format in there and risk a broken implementation, that's entirely up to you, The eHealthNetwork specification is clear on this point. If you make a conscious decision not to follow those guidelines, then please be aware that any lack of interoperability is entirely at your own risk.
from eu-dcc-schema.
Yep, all good. As a universal verifier, we don't get to choose how people issue their certificates. We simply accept every type of payload we can. It doesn't matter if it follows a spec or not.
from eu-dcc-schema.
Related Issues (20)
- 404 when downloading https://id.uvci.eu/DCC.ValueSets.schema.json HOT 5
- What to do if vaccines not included in value set? HOT 2
- Remove valuesets in DCC Schema repo
- test-manf.json is not up to date HOT 1
- Support of entries with unicode characters from the "Halfwidth and Fullwidth" Forms block HOT 2
- Expand the existing schema to include personal identity fields HOT 7
- JSON Schema here to help HOT 1
- Problem during Make HOT 1
- Make `nam/fn` a required field
- Missing descriptions of "tg" property in test and recovery groups HOT 1
- Improve description of "nam" field HOT 9
- Link does not exist HOT 4
- Please add Novavax - Medicinal Product and Producer HOT 1
- outdated/problem with a link HOT 5
- array of a single element? HOT 9
- Check relaxation of fn/fnt, gn/gnt HOT 7
- Automatically format the JSON files before commit HOT 5
- Add broadcasting of a new release to the docs HOT 1
- Align valuesets schema with valuesets HOT 4
- Move FAQ from Wiki to repository itself HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eu-dcc-schema.