{"id":2734,"date":"2019-12-26T08:25:36","date_gmt":"2019-12-26T01:25:36","guid":{"rendered":"http:\/\/vietnam.briswell.com\/?p=2734"},"modified":"2020-05-07T14:08:07","modified_gmt":"2020-05-07T07:08:07","slug":"swift5-1-updates","status":"publish","type":"post","link":"https:\/\/www.briswell-vn.com\/en\/news\/swift5-1-updates\/","title":{"rendered":"iOS Programming: New updates in SWIFT 5.1"},"content":{"rendered":"<p><\/p>\n<h2>1. Introduction<\/h2>\n<h3>\u00a0 \u00a0 a) Released date<\/h3>\n<ul>\n<li>On 20<sup>th<\/sup> September 2019, Apple released the brand new Xcode 11,\u00a0 featuring support for new iOS 13. And came along with that, Apple released new version of its developing language: Swift 5.1.<\/li>\n<\/ul>\n<h3>\u00a0 \u00a0 b) Overall<\/h3>\n<ul>\n<li>Swift 5.1 builds on the strength of Swift 5 by extending the stable features of language to compile time with the introduction of <strong><em>module stability<\/em><\/strong> (section 2). With module stability it\u2019s now possible to create and share binary frameworks that will work with the future releases of Swift. Swift 5.1 also extends the capabilities of the language and the standard library with new features such as property wrapper, opaque result types. Key path member lookup, diffing for appropriate collection types, and new APIs for String. Altogether the new features of Swift 5.1 make it easier to design better APIs and reduce the amount of common boilerplate code.<\/li>\n<\/ul>\n<h2>2.\u00a0Module stability<\/h2>\n<ol>\n<li>Swift 5.1 enables the creation of Binary frameworks that can be shared with others leveraging the language\u2019s added support for module stability.<\/li>\n<li>Module stability defines a new text-based module interface file that describes the API of a binary framework, allowing it to be compiled with code using different versions of the compiler.<\/li>\n<\/ol>\n<h2>3. Standard library update<\/h2>\n<p>The standard library in Swift 5.1 includes some of the features below:<\/p>\n<ol>\n<li>Support for handling and updating diffs on collections of appropriate types.<\/li>\n<li>Increased flexibility for initializing an array.<\/li>\n<li>Additional APIs for making it easier to work with Strings, including creating and handling contiguous strings, helpers for working with Unicode text, and generic initializers for String.Index and Range.<\/li>\n<li>A variety of incremental API improvements for working with SIMD types, including support for extending vectors, reductions, and vector swizzles.<\/li>\n<li>Identifiable protocol for supporting entities that require unique identifiers.<\/li>\n<\/ol>\n<h2>4. Language Improvements<\/h2>\n<h3>\u00a0 \u00a0 a)\u00a0Huge improvement in auto-generated memberwise initializers<\/h3>\n<ol>\n<li>Swift 5.1 introduces major improvements to one of Swift\u2019s most commonly used features: memberwise initializers with default values for structs.<\/li>\n<li>In earlier versions of Swift (include Swift 5.0 and earlier versions), we have to pass all parameters to the initializer for all properties in the struct, either its properties have default values or not. A memberwise initializer was automatically created to accept parameters matching the properties of a struct , like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3751 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture1-1.png\" alt=\"\" width=\"864\" height=\"200\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164538\/Picture1-1.png 864w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164538\/Picture1-1-300x69.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164538\/Picture1-1-768x178.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/li>\n<li>In Swift 5.1, the memberwise initializer will use default parameter values for any properties that have them. In previous sample, we \u2018ve given <strong>score <\/strong>property a default value <strong>0\u00a0<\/strong>which means we can either pass parameter for it or leave it with default value.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3752 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture2-1.png\" alt=\"\" width=\"864\" height=\"218\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164600\/Picture2-1.png 864w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164600\/Picture2-1-300x76.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164600\/Picture2-1-768x194.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/li>\n<\/ol>\n<ul>\n<li>This lets us avoid repeating code. This also brings flexibilities in initializing a struct, especially when you want to creating multiple instances with have the same standard default values in their properties. But beside the good points, it is not explicit that multiple auto-generated memberwise initializers are to be declared by only one initializer function, like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3753 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture3.png\" alt=\"\" width=\"864\" height=\"329\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164621\/Picture3.png 864w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164621\/Picture3-300x114.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164621\/Picture3-768x292.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/li>\n<li>Like the example above, we have one function for initializing, but we can declare in 2 ways. So this is not appeared to be like a module\u2018s public API \u2013 that means if we want to create a library or framework, we should to define public initializers manually.<\/li>\n<\/ul>\n<h3>\u00a0 \u00a0 b) Implicit returns from single-expression functions<\/h3>\n<ul>\n<li>Swift 5.1 has removed a small but important inconsistency in the language: single-expression functions that return a value can now remove the <strong>return<\/strong> keyword and Swift will understand it implicitly.<\/li>\n<li>For example:<\/li>\n<li>Swift 5:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3754 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture4.png\" alt=\"\" width=\"864\" height=\"129\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164649\/Picture4.png 864w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164649\/Picture4-300x45.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164649\/Picture4-768x115.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/li>\n<li>In Swift 5.1, if functions contain a single expression\u00a0 or just a single statement that evaluates to a value then you can leave off the <strong>return<\/strong> keyword, like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3755 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture5.png.png\" alt=\"\" width=\"864\" height=\"129\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164710\/Picture5.png.png 864w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164710\/Picture5.png-300x45.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164710\/Picture5.png-768x115.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/li>\n<li>This may make people confuse at first, but I think they will get used to it soon.<\/li>\n<\/ul>\n<h3>\u00a0 \u00a0 c) Opaque return types<\/h3>\n<ul>\n<li>Swift 5.1 introduces the concept of opaque types into Swift. An opaque type is one where we\u2018re told about the capabilities of an object without knowing specifically what king of object it is.<\/li>\n<li>Overall, it sounds like a protocol, but opaque return types take the concept if protocols significantly further because they are able to work with associated types. They require the same type to be used internally each time, and they allow us to hide implementation details.<\/li>\n<li>As an example, if I want to create different kinds of animals, we can write code like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3756 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture6.png\" alt=\"\" width=\"770\" height=\"347\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164730\/Picture6.png 770w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164730\/Picture6-300x135.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164730\/Picture6-768x346.png 768w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/li>\n<li>But there is one problem. What if we compare those class\u2019s instances. Maybe you can compare 2 Dog instances or 2 Cat instances but you cannot compare a Cat and a Dog. It does not make any sense, even though these 2 functions return Animal type. That means sometime you forgot which type of variables you have created. So I suggest to write like the following example:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3757 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture7.png\" alt=\"\" width=\"864\" height=\"660\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164747\/Picture7.png 864w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164747\/Picture7-300x229.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164747\/Picture7-768x587.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/li>\n<\/ul>\n<h3>\u00a0 \u00a0 d) Using <strong>Self <\/strong>to refer to enclosing type<\/h3>\n<ul>\n<li>In previous versions of Swift, <strong><em>Self<\/em><\/strong> keyword enabled us to dynamically refer to a type in contexts where the actual concrete type isn\u2019t known. For example by referring to a protocol\u2019s implementing type within a protocol extension:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3758 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture8.png\" alt=\"\" width=\"918\" height=\"154\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164810\/Picture8.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164810\/Picture8-300x50.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164810\/Picture8-768x129.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<li>The scope of Self in Swift 5.1 version has now been extended to also include concrete types \u2014 like enums, structs and classes \u2014 enabling us to use Self as a sort of alias referring to a method or property\u2019s enclosing type, like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3759 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture9.png\" alt=\"\" width=\"918\" height=\"277\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164905\/Picture9.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164905\/Picture9-300x91.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164905\/Picture9-768x232.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<li>The fact that we can now use Self above, rather than the full TextTransform type name, is of course purely syntactic sugar \u2014 but it can help make our code a bit more compact, especially when dealing with long type names. We can even use Self inline within a method or property as well, further making the above code even more compact:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3760 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture10.png\" alt=\"\" width=\"918\" height=\"277\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164933\/Picture10.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164933\/Picture10-300x91.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164933\/Picture10-768x232.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<li>Let \u2018s see some following examples<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3761 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture11.png\" alt=\"\" width=\"918\" height=\"410\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164957\/Picture11.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164957\/Picture11-300x134.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06164957\/Picture11-768x343.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3762 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture12.png\" alt=\"\" width=\"918\" height=\"410\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165012\/Picture12.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165012\/Picture12-300x134.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165012\/Picture12-768x343.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<li>In the first example, I print the static property <strong><em>poolConnections<\/em><\/strong>. Even after overriding the property in class <strong><em>ThrottleNetworkManager<\/em><\/strong>, it will just print out the value of its parent class. And <strong><em>Self <\/em><\/strong>comes to solve this issue, as we can see in the second picture. This brings the flexibility in extending your classes, protocols , \u2026<\/li>\n<\/ul>\n<h3>\u00a0 \u00a0 e) Warnings for ambiguous <strong>none <\/strong>cases<\/h3>\n<ul>\n<li>Swift\u2019s optionals are implemented as an enum of two cases: some and none. This gave rise to the possibility of confusion if we created our own enums that had a none case, then wrapped that inside an optional.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3763 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture12-1.png\" alt=\"\" width=\"918\" height=\"366\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165034\/Picture12-1.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165034\/Picture12-1-300x120.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165034\/Picture12-1-768x306.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<li>The <strong>optionalColor<\/strong> has value \u201cnil\u201d because Swift assumes .<strong>none<\/strong> means the optional is empty, rather than an optional with the value CustomColor.none.<\/li>\n<li>In Swift 5.1 this confusion now prints a warning: \u201cAssuming you mean &#8216;Optional.none&#8217;; did you mean \u2018CustomColor.none\u2019 instead?\u201d This avoids the source compatibility breakage of an error, but at least informs developers that their code might not quite mean what they thought.<\/li>\n<\/ul>\n<h3>\u00a0 \u00a0 f)\u00a0Matching optional enums against non-optionals<\/h3>\n<ul>\n<li>Swift has always been smart enough to handle switch\/case pattern matching between optionals and non-optionals for strings and integers, but before Swift 5.1 that wasn\u2019t extended to enums.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3764 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture13.png\" alt=\"\" width=\"918\" height=\"470\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165057\/Picture13.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165057\/Picture13-300x154.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165057\/Picture13-768x393.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<li>In Swift 5.1 we can now use switch\/case pattern matching to match optional enums with non-optionals, like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3765 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture14.png\" alt=\"\" width=\"918\" height=\"470\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165120\/Picture14.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165120\/Picture14-300x154.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165120\/Picture14-768x393.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<\/ul>\n<h3>\u00a0 \u00a0 g)\u00a0Ordered collection diffing<\/h3>\n<ul>\n<li>Swift 5.1 gives us a new difference(from:) method that calculates the differences between two ordered collections \u2013 what items to remove and what items to insert. This can be used with any ordered collection that contains Equatable elements.<\/li>\n<li>To demonstrate this, we can create an array of scores, calculate the difference from one to the other, then loop over those differences and apply each one to make our two collections the same.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3766 size-full\" src=\"https:\/\/briswell-vn.com\/wp-content\/uploads\/2019\/12\/Picture15.png\" alt=\"\" width=\"918\" height=\"612\" srcset=\"https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165149\/Picture15.png 918w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165149\/Picture15-300x200.png 300w, https:\/\/s3-ap-southeast-1.amazonaws.com\/homepage-media\/wp-content\/uploads\/2019\/12\/06165149\/Picture15-768x512.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/li>\n<li>Some of you may think that it is too simple to change an array to be the same with an array \u2013 just \u201cassign it by the other\u201d. But it may cause a bad performance in updating UI. For example, I have a tableview T with a datasource List. Datasource List is fetched from a web API\/ web service. When the data from API changes, List will be change and tableView T will be change. And if we just assign List with a whole new dataset from the service, tableview will be reloaded completely. And there will be some lag in UI performance. With Diff API, you can easily remove or insert new rows for tableview, which helps reducing duration in updating UI.<\/li>\n<\/ul>\n<h2>5. Conclusion<\/h2>\n<ul>\n<li>Swift 5.1 is still under development, and although the final branching for Swift itself has passed there is still scope to see changes from some of the other associated projects.<\/li>\n<li>Swift is now not only ABI stable, but also module stable. On top of that, Swift 5.1 also includes many small but welcome changes and tweaks that should be applicable to almost any code base.<\/li>\n<li>Beside the good points, like flexibilities in code base, there are some of features that need to be considered. The optional enums (session 4.e, 4.f) are marked as bugs and it reminds the developers to use explicit type instead, in order to avoid some external bugs in the future.<\/li>\n<\/ul>\n<h4>What do you think? Have you already migrated your projects to Swift 5.1? If not, try out now!<\/h4>\n<p>&nbsp;<\/p>\n<p>References:<\/p>\n<ol>\n<li><a href=\"https:\/\/swift.org\/blog\/swift-5-1-released\/\">https:\/\/swift.org\/blog\/swift-5-1-released\/<\/a><\/li>\n<li><a href=\"https:\/\/www.hackingwithswift.com\/articles\/182\/whats-new-in-swift-5-1\"> https:\/\/www.hackingwithswift.com\/articles\/182\/whats-new-in-swift-5-1<\/a><\/li>\n<\/ol>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>1. Introduction \u00a0 \u00a0 a) Released date On 20th September 2019, Apple released the brand new Xcode 11,\u00a0 featuring support for new iOS 13. And came along with that, Apple released new version of its developing language: Swift 5.1. \u00a0 \u00a0 b) Overall Swift 5.1 builds on the strength of Swift 5 by extending the stable features of language to compile time with the introduction [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3750,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[4,71],"tags":[],"class_list":["post-2734","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","category-it-tec"],"_links":{"self":[{"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/posts\/2734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/comments?post=2734"}],"version-history":[{"count":0,"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/posts\/2734\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/media\/3750"}],"wp:attachment":[{"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/media?parent=2734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/categories?post=2734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.briswell-vn.com\/en\/wp-json\/wp\/v2\/tags?post=2734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}