This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Purpose: | |
Convert (or Serialize) an object to a JSON String or Dictionary. | |
Usage: | |
Use 'Serialize.toJSON' on instances of classes that: | |
- Inherit from NSObject | |
- Implement 'Serializable' protocol | |
- Implement the property 'jsonProperties' and return an array of strings with names of all the properties to be serialized |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func getQueryStringParameter(url: String, param: String) -> String? { | |
let url = NSURLComponents(string: url)! | |
return | |
(url.queryItems? as [NSURLQueryItem]) | |
.filter({ (item) in item.name == param }).first? | |
.value() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Public Domain CC0 license. https://creativecommons.org/publicdomain/zero/1.0/ | |
"""MongoDB Apache Beam IO utilities. | |
Tested with google-cloud-dataflow package version 2.0.0 | |
""" | |
__all__ = ['ReadFromMongo'] | |
import datetime |