<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Blog posts by josef ottosson</title><link href="http://world.optimizely.com" /><updated>2021-05-29T09:56:58.0000000Z</updated><id>https://world.optimizely.com/blogs/josef-ottosson/</id> <generator uri="http://world.optimizely.com" version="2.0">Optimizely World</generator> <entry><title>New major version of JOS.ContentSerializer - Version 5.0</title><link href="https://josef.codes/new-major-version-of-jos-contentserializer-version-5-0/" /><id>Bug fix and a breaking change in the new major version of JOS.ContentSerializer.</id><updated>2021-05-29T09:56:58.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.ContentSerializer now supports TimeSpan? out of the box</title><link href="https://josefottosson.se/jos-contentserializer-now-supports-timespan-out-of-the-box/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;&lt;a href=&quot;/link/dda8dd3edbaa4ce3938dc6544ae1d184.aspx&quot;&gt;Saw the following post today&lt;/a&gt; and decided to update &lt;a href=&quot;https://github.com/joseftw/JOS.ContentSerializer&quot;&gt;JOS.ContentSerializer&lt;/a&gt; to support &lt;code&gt;TimeSpan?&lt;/code&gt; properties.&lt;/p&gt;
&lt;p&gt;The default implementation is really naive:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;public object Handle(TimeSpan? value, PropertyInfo property, IContentData contentData)
{
    return value?.ToString();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to customize the behaviour, &lt;a href=&quot;https://josefottosson.se/customizing-propertyhandlers-in-jos-contentserializer/&quot;&gt;just follow this post&lt;/a&gt;&lt;/p&gt;
&lt;!--kg-card-end: markdown--&gt;</id><updated>2019-09-04T19:38:02.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.ContentSerializer now supports TimeSpan? out of the box</title><link href="http://josefottosson.se/jos-contentserializer-now-supports-timespan-out-of-the-box/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;&lt;a href=&quot;/link/dda8dd3edbaa4ce3938dc6544ae1d184.aspx&quot;&gt;Saw the following post today&lt;/a&gt; and decided to update &lt;a href=&quot;https://github.com/joseftw/JOS.ContentSerializer&quot;&gt;JOS.ContentSerializer&lt;/a&gt; to support &lt;code&gt;TimeSpan?&lt;/code&gt; properties.&lt;/p&gt;
&lt;p&gt;The default implementation is really naive:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;public object Handle(TimeSpan? value, PropertyInfo property, IContentData contentData)
{
    return value?.ToString();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to customize the behaviour, &lt;a href=&quot;https://josefottosson.se/customizing-propertyhandlers-in-jos-contentserializer/&quot;&gt;just follow this post&lt;/a&gt;&lt;/p&gt;
&lt;!--kg-card-end: markdown--&gt;</id><updated>2019-09-04T17:38:02.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.ContentSerializer now supports TimeSpan? out of the box</title><link href="https://josef.codes/jos-contentserializer-now-supports-timespan-out-of-the-box/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;&lt;a href=&quot;/link/dda8dd3edbaa4ce3938dc6544ae1d184.aspx&quot;&gt;Saw the following post today&lt;/a&gt; and decided to update &lt;a href=&quot;https://github.com/joseftw/JOS.ContentSerializer&quot;&gt;JOS.ContentSerializer&lt;/a&gt; to support &lt;code&gt;TimeSpan?&lt;/code&gt; properties.&lt;/p&gt;
&lt;p&gt;The default implementation is really naive:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;public object Handle(TimeSpan? value, PropertyInfo property, IContentData contentData)
{
    return value?.ToString();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to customize the behaviour, &lt;a href=&quot;https://josefottosson.se/customizing-propertyhandlers-in-jos-contentserializer/&quot;&gt;just follow this post&lt;/a&gt;&lt;/p&gt;
&lt;!--kg-card-end: markdown--&gt;</id><updated>2019-09-04T17:38:02.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.ContentSerializer now supports TimeSpan? out of the box</title><link href="https://josef.codes/jos-contentserializer-now-supports-timespan-out-of-the-box/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;&lt;a href=&quot;/link/dda8dd3edbaa4ce3938dc6544ae1d184.aspx&quot;&gt;Saw the following post today&lt;/a&gt; and decided to update &lt;a href=&quot;https://github.com/joseftw/JOS.ContentSerializer&quot;&gt;JOS.ContentSerializer&lt;/a&gt; to support &lt;code&gt;TimeSpan?&lt;/code&gt; properties.&lt;/p&gt;
&lt;p&gt;The default implementation is really naive:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;public object Handle(TimeSpan? value, PropertyInfo property, IContentData contentData)
{
    return value?.ToString();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to customize the behaviour, &lt;a href=&quot;https://josefottosson.se/customizing-propertyhandlers-in-jos-contentserializer/&quot;&gt;just follow this post&lt;/a&gt;&lt;/p&gt;
&lt;!--kg-card-end: markdown--&gt;</id><updated>2019-09-04T17:38:02.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.Epi.ContentApi updated to version 3.0.0</title><link href="https://josefottosson.se/jos-epi-contentapi-updated-to-version-3-0-0/" /><id>&lt;p&gt;Thanks to the &lt;a href=&quot;/link/bde262b8287545f7994f7016e3841613.aspx#comment7869&quot;&gt;discussion in the comments on the blogpost written by Johan Bj&#246;rnfot&lt;/a&gt; I could simplify the code a lot and remove the HttpModule.&lt;/p&gt;

&lt;p&gt;Version 3.0.0 is now available on the &lt;a href=&quot;https://www.nuget.org/packages/JOS.Epi.ContentApi/&quot;&gt;nuget feed&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It&#39;s a major version bump since I removed the HttpModule, you will need to&lt;/p&gt;</id><updated>2018-06-05T14:10:48.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.Epi.ContentApi updated to version 3.0.0</title><link href="http://josefottosson.se/jos-epi-contentapi-updated-to-version-3-0-0/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;Thanks to the &lt;a href=&quot;/link/bde262b8287545f7994f7016e3841613.aspx#comment7869&quot;&gt;discussion in the comments on the blogpost written by Johan Bj&#246;rnfot&lt;/a&gt; I could simplify the code a lot and remove the HttpModule.&lt;/p&gt;
&lt;p&gt;Version 3.0.0 is now available on the &lt;a href=&quot;https://www.nuget.org/packages/JOS.Epi.ContentApi/&quot;&gt;nuget feed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&#39;s a major version bump since I removed the HttpModule, you will need to&lt;/p&gt;</id><updated>2018-06-05T12:10:48.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.Epi.ContentApi updated to version 3.0.0</title><link href="https://josef.codes/jos-epi-contentapi-updated-to-version-3-0-0/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;Thanks to the &lt;a href=&quot;/link/bde262b8287545f7994f7016e3841613.aspx#comment7869&quot;&gt;discussion in the comments on the blogpost written by Johan Bj&#246;rnfot&lt;/a&gt; I could simplify the code a lot and remove the HttpModule.&lt;/p&gt;
&lt;p&gt;Version 3.0.0 is now available on the &lt;a href=&quot;https://www.nuget.org/packages/JOS.Epi.ContentApi/&quot;&gt;nuget feed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&#39;s a major version bump since I removed the HttpModule, you will need to&lt;/p&gt;</id><updated>2018-06-05T12:10:48.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Headless Episerver? Meet JOS.Epi.ContentApi</title><link href="https://josefottosson.se/headless-episerver-meet-jos-epi-contentapi/" /><id>&lt;p&gt;I read &lt;a href=&quot;https://blog.mathiaskunto.com/2018/03/23/react-and-episerver-moving-to-episerver-headless-episerver-contentdeliveryapi-with-friendly-urls-quick-poc/&quot;&gt;this blog post by Mathias Kunto&lt;/a&gt; where he says that he will leave my beloved library behind and start using &lt;a href=&quot;https://sdk.episerver.com/ContentDeliveryAPI/Index.html&quot;&gt;the new Episerver Headless API&lt;/a&gt; instead.&lt;/p&gt;

&lt;p&gt;I felt like the picture above :(&lt;/p&gt;

&lt;p&gt;I couldn&#39;t stand it. So, I decided to create a new library; meet &lt;a href=&quot;https://github.com/joseftw/JOS.Epi.ContentApi&quot;&gt;&lt;strong&gt;JOS.Epi.ContentApi&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</id><updated>2018-04-06T14:29:34.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Headless Episerver? Meet JOS.Epi.ContentApi</title><link href="http://josefottosson.se/headless-episerver-meet-jos-epi-contentapi/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;I read &lt;a href=&quot;https://blog.mathiaskunto.com/2018/03/23/react-and-episerver-moving-to-episerver-headless-episerver-contentdeliveryapi-with-friendly-urls-quick-poc/&quot;&gt;this blog post by Mathias Kunto&lt;/a&gt; where he says that he will leave my beloved library behind and start using &lt;a href=&quot;https://sdk.episerver.com/ContentDeliveryAPI/Index.html&quot;&gt;the new Episerver Headless API&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;I felt like the picture above :(&lt;/p&gt;
&lt;p&gt;I couldn&#39;t stand it. So, I decided to create a new library; meet &lt;a href=&quot;https://github.com/joseftw/JOS.Epi.ContentApi&quot;&gt;&lt;strong&gt;JOS.Epi.ContentApi&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</id><updated>2018-04-06T12:29:34.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Headless Episerver? Meet JOS.Epi.ContentApi</title><link href="https://josef.codes/headless-episerver-meet-jos-epi-contentapi/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;I read &lt;a href=&quot;https://blog.mathiaskunto.com/2018/03/23/react-and-episerver-moving-to-episerver-headless-episerver-contentdeliveryapi-with-friendly-urls-quick-poc/&quot;&gt;this blog post by Mathias Kunto&lt;/a&gt; where he says that he will leave my beloved library behind and start using &lt;a href=&quot;https://sdk.episerver.com/ContentDeliveryAPI/Index.html&quot;&gt;the new Episerver Headless API&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;I felt like the picture above :(&lt;/p&gt;
&lt;p&gt;I couldn&#39;t stand it. So, I decided to create a new library; meet &lt;a href=&quot;https://github.com/joseftw/JOS.Epi.ContentApi&quot;&gt;&lt;strong&gt;JOS.Epi.ContentApi&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</id><updated>2018-04-06T12:29:34.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>How to configure Episerver to use Active Directory</title><link href="https://josefottosson.se/how-to-configure-episerver-to-use-active-directory/" /><id>&lt;p&gt;This is a quick guide showing how to configure Episerver to use Active Directory instead of &lt;code&gt;Multiplexing/WindowsProvider&lt;/code&gt;. This is NOT showing how to use Azure AD. &lt;br /&gt;
Im testing this on a new Alloy site running Episerver &lt;code&gt;11.3.1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;NOTE, while this is a quick way of adding Active&lt;/p&gt;</id><updated>2018-03-14T16:33:25.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>How to configure Episerver to use Active Directory</title><link href="http://josefottosson.se/how-to-configure-episerver-to-use-active-directory/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;This is a quick guide showing how to configure Episerver to use Active Directory instead of &lt;code&gt;Multiplexing/WindowsProvider&lt;/code&gt;. This is NOT showing how to use Azure AD.&lt;br /&gt;
Im testing this on a new Alloy site running Episerver &lt;code&gt;11.3.1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;NOTE, while this is a quick way of adding Active&lt;/p&gt;</id><updated>2018-03-14T15:33:25.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>How to configure Episerver to use Active Directory</title><link href="https://josef.codes/how-to-configure-episerver-to-use-active-directory/" /><id>&lt;!--kg-card-begin: markdown--&gt;&lt;p&gt;This is a quick guide showing how to configure Episerver to use Active Directory instead of &lt;code&gt;Multiplexing/WindowsProvider&lt;/code&gt;. This is NOT showing how to use Azure AD.&lt;br /&gt;
Im testing this on a new Alloy site running Episerver &lt;code&gt;11.3.1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;NOTE, while this is a quick way of adding Active&lt;/p&gt;</id><updated>2018-03-14T15:33:25.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Customizing PropertyHandlers in JOS.ContentSerializer</title><link href="https://josefottosson.se/customizing-propertyhandlers-in-jos-contentserializer/" /><id>Shows how to easily replace a built in PropertyHandler.</id><updated>2018-01-25T09:51:43.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Customizing PropertyHandlers in JOS.ContentSerializer</title><link href="http://josefottosson.se/customizing-propertyhandlers-in-jos-contentserializer/" /><id>Shows how to easily replace a built in PropertyHandler.</id><updated>2018-01-25T08:51:43.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.ContentSerializer 3.0 has been released!</title><link href="https://josefottosson.se/jos-contentserializer-3-0-has-been-released/" /><id>&lt;h2 id=&quot;newfeatures&quot;&gt;New features&lt;/h2&gt;

&lt;h4 id=&quot;supportformorebuiltinproperties&quot;&gt;Support for more built in properties&lt;/h4&gt;

&lt;p&gt;The following properties are now supported out of the box:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;BlockData&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;double&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ContentArea&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ContentReference&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DateTime&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;IEnumerable&amp;lt;ContentReference&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;int&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;LinkItemCollection&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PageReference&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PageType&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;string[]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;string&lt;/code&gt; &lt;em&gt;SelectOne/SelectMany&lt;/em&gt; support.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Url&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;XhtmlString&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NEW &lt;code&gt;IEnumerable&amp;lt;string&amp;gt;&lt;/code&gt;&lt;/strong&gt; &lt;em&gt;ICollection/IList works as well&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NEW&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;</id><updated>2017-12-29T18:34:07.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.ContentSerializer now supports Episerver 11</title><link href="https://josefottosson.se/jos-contentserializer-now-supports-episerver-11/" /><id>&lt;p&gt;I&#39;ve just pushed version &lt;strong&gt;2.0.0&lt;/strong&gt; to the nuget feed. &lt;br /&gt;
The following breaking changes was introduced:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Target framework is now set to 4.6.1&lt;a href=&quot;/link/fe81cfd67cfd4ee79c862a762311dc6b.aspx&quot;&gt;(same as Epi)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Minimum version 11.1.0 of EPiServer.CMS.UI.Core is required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I&#39;ve only tested it with an manually upgraded Alloy&lt;/p&gt;</id><updated>2017-11-24T18:43:31.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>JOS.ContentJson gets replaced by JOS.ContentSerializer</title><link href="https://josefottosson.se/jos-contentjson-gets-replaced-by-jos-contentserializer/" /><id>JOS.ContentJson gets replaced by JOS.ContentSerializer. Fun fun fun!</id><updated>2017-05-21T21:09:58.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Custom Episerver routes without querystring - IPartialRouter</title><link href="https://josefottosson.se/custom-episerver-routes-without-querystring-ipartialrouter/" /><id>&lt;p&gt;I will show you how to easily bind parameters to your action methods without using the querystring.&lt;/p&gt;

&lt;p&gt;I have a page, &lt;code&gt;MyPage&lt;/code&gt;, with a controller that looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;public async Task&amp;lt;ActionResult&amp;gt; Index(MyPage currentPage, int myId)  
{
    var response = await this.thirdPartyApi.Get(myId);
    // Do something with&lt;/code&gt;&lt;/pre&gt;</id><updated>2017-04-18T21:41:48.0000000Z</updated><summary type="html">Blog post</summary></entry></feed>