-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Implementation of XML Format #448
Conversation
formats/xml/src/main/java/io/cloudevents/xml/XMLDeserializer.java
Outdated
Show resolved
Hide resolved
formats/xml/src/main/java/io/cloudevents/xml/XMLDeserializer.java
Outdated
Show resolved
Hide resolved
formats/xml/src/main/resources/META-INF/services/io.cloudevents.core.format.EventFormat
Outdated
Show resolved
Hide resolved
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Day, Jeremy(jday) <[email protected]> Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Jem Day <[email protected]>
formats/xml/src/main/java/io/cloudevents/xml/XMLSerializer.java
Outdated
Show resolved
Hide resolved
formats/xml/src/main/java/io/cloudevents/xml/XMLDeserializer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jem Day <[email protected]>
|
||
class XMLUtils { | ||
|
||
private static final Pattern XML_PATTERN = Pattern.compile("^(application|text)\\/([a-zA-Z]+\\+)?xml(;.*)*$"); | ||
private static final Pattern TEXT_PATTERN = Pattern.compile("^application\\/([a-zA-Z]+\\+)?(xml|json)(;.*)*$"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're adding json
too because it's a common / well known "text-based format", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes ... any text/*
content-types are caught in the utility function without using the regex (to keep it simpler!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LGTM
Closes #446