-
Notifications
You must be signed in to change notification settings - Fork 466
Make json serialization treat maps as maps, always. #404
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
Conversation
Even if they are iterable, like clojure maps.
415d06e to
e61ff6d
Compare
|
Hello - thanks for contributing. Just a quick update that this repository is currently frozen whilst we fix some backend stuff related to the release process, and submit a release. It should be unfrozen in a few weeks. More generally, this repository is in maintenance mode; we may not be able to get to this PR for some time. |
chingor13
left a comment
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 for contributing this!
Is there a sample test case we can add to demonstrate this fix?
|
@chingor13 I'm not 100% sure where to put the tests - it doesn't look like there are any generator tests currently - only parser tests. From my perspective, I'm using https://googlecloudplatform.github.io/google-cloud-java/google-cloud-clients/apidocs/com/google/cloud/bigquery/InsertAllRequest.Builder.html#addRow-java.lang.String-java.util.Map- - which takes an arbitrary map. This currently fails spectacularly for Clojure maps, but generally an implementation of import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Spliterator;
import java.util.function.Consumer;
public class IterableMap extends HashMap<String, String> implements Iterable<Map.Entry<String, String>> {
@Override
public Iterator<Entry<String, String>> iterator() {
return entrySet().iterator();
}
@Override
public void forEach(Consumer<? super Entry<String, String>> action) {
entrySet().forEach(action);
}
@Override
public Spliterator<Entry<String, String>> spliterator() {
return entrySet().spliterator();
}
} |
* Add Kokoro continuous integration config and badges * Fix indentation and other PR comments
* Add CODEOWNERS file and issue/pr templates * Fix team alias * Fix team alias
* Fix code.google.com links. Fix maven version * Add intellij cruft to gitignore
* Add Kokoro release scripts * Update pom.xml files with sonatyle release process * Set common configs * Specify the trampoline image to use for release jobs * Fix the execution directory * Fix the execution directory * Fix the execution directory * remove gpg for testing * skip gpg-agent * keyring args are paths * use gpg.homedir * Fix gpg tty * set pinentry-mode
* Allows enums as element types (googleapis#475) * Remove Blank lines (googleapis#475)
* Add versions.txt file * Add version tags to pom.xml files
* Release v1.26.0 * Fix samples version annotations * set maven memory limits for tests * Fix ordering of modules so deploy can happen * Fix straggler versions for assembly
* Actually enable the nexus-staging-maven-plugin * Make the assembly plugin use properties to output the right filename * Update maven-assembly-plugin so it can update the project version in the dependency html files
* Add java 11 test config * Update README badge to use Java 11 instead of Java 10
* Remove deprecated BackOffPolicy interface It was scheduled to be removed in 1.18 (March 2014) * Add builder to removed deprecated classes
* Add initial pom.xml and README for bom * Add the bom in the dependencyManagement section of the parent pom * artifact poms do not need special release info * PR comments * Put dependencyManagement section back in parent pom
* Fixes bug in googleapis#475, add relevant Tests (googleapis#504) * Adding more Tests for XML parsing/mapping (googleapis#504) * Add more list tests (googleapis#504) * Cleanup documentation of tests (googleapis#504) * Adding asserts in GenericXmlTests (googleapis#504) * Try-with-resources Java6 Style (googleapis#504) * Replace Heise feed with Custom feed, set encoding for reading file (googleapis#504) * Use Guava for reading resource file (googleapis#504) * delete commented out code (googleapis#504) * Improve JavaDoc of Tests (googleapis#504) * Change method of asserting enums (googleapis#504) * Minor fixes in JavaDoc (googleapis#504) * Rename Test methods (googleapis#504) * Fix Typo in JavaDoc (googleapis#504) * Remove irrelevant annotation, clean up test case (googleapis#504) * Fix incorrect/missing annotations, improve instanceof annotations (googleapis#504)
* fix snapshot tests * ignore eclipse metadata * reset some sample files * fix prototest
…oogleapis#521) This reverts commit d5effe8.
* Use doclint to skip checks of javadoc (googleapis#524) * Remove comment out command (googleapis#522)
* Introduce API to set writeTimeout and use it in the NetHttp request * Surface the writeTimeout to HttpRequest * remove debug statements * Fix warnings * Fix syntax * DI for testing * Make field constant field final
* Release v1.27.0 * Fix `@since` javadoc for new write timeout features * Fix VERSION constant * Fix version annotations in google-http-client-android-test artifact * Fix line length * Cleanup output and fix plugin versions * Change order of deployed assets * Add nexus-staging-maven-plugin and release profile to bom * Put the pom last again * bom needs a developers section
* Fix googleapis#340 HttpHeaders won't let me put/set "accept" * fix case of null value
* Fix googleapis#351 UriTemplate.expand does not properly escape characters for path-style parameter expansion * remove unused import
…pis#535) * fix googleapis#323 IllegalCharsetNameException in HttpResponse getContentCharset() if charset is malformed * add test case * remove unused import
…leapis#540) * fix googleapis#342 JsonGenerator and JsonParser should implement Closeable (and Flushable) * remove flushable from JsonParser
* Compile to Java 1.7 binary * Fix javadoc links to official Java 7 docs
* Mark google-http-client-jackson classes as deprecated * Remove disallowed annotation
* Split apache transport into 2 artifacts, current and legacy * Fix poms to make tests pass
* Inherit plugin versions from parent pom * Remove GooglePlus Sample as the service is going away * Upgrade findbugs-maven-plugin to fix tests
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
|
Bleh, GitHub did not like the merge from master. |
Even if they are iterable, like clojure maps. See googleapis/google-cloud-java#1890 . See https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/APersistentMap.java#L16 .