#json.net
Explore tagged Tumblr posts
techtutorialsx · 5 months ago
Text
C#: JSONPath
How to apply JSONPath expressions in C#, using the Json.net library.
Introduction In this tutorial we will learn how to apply JSONPath expressions in C#, using the Json.net library. Continue reading C#: JSONPath
Tumblr media
View On WordPress
1 note · View note
abellasystems · 2 years ago
Text
Top 23 .NET Core Libraries Every Developer Must Know
.NET Core has emerged as a powerful and versatile platform for developing modern applications. With a rich ecosystem of libraries and frameworks, developers can streamline their workflow and create robust, feature-rich applications. In this blog post, we will explore the top 23 .NET Core libraries that every dot net developer should be familiar with. These libraries cover a wide range of functionalities, from web development and data manipulation to testing and security.
1. ASP.NET Core
ASP.NET Core is a widely-used framework for building web applications and APIs. It offers enhanced performance and cross-platform capabilities, making it a top choice for web development.
2. Entity Framework Core
Entity Framework Core simplifies database interactions by providing an object-relational mapping (ORM) system. It enables developers to work with databases using object-oriented programming.
3. Newtonsoft.Json
Newtonsoft.Json, also known as JSON.NET, is a popular library for working with JSON data. It simplifies JSON serialization and deserialization, making it easier to integrate web services.
4. AutoMapper
Automapper allows developers to map between different object types automatically. It's particularly useful when dealing with complex object mappings.
5. FluentValidation
FluentValidation is a powerful library for creating and validating complex validation rules in a clean and concise manner.
6. Serilog
Serilog is a flexible logging library that offers structured logging and various sinks for storing log data, such as databases and file systems.
7. Dapper
Dapper is a micro ORM that offers high performance when working with databases. It allows developers to write raw SQL queries and map the results to .NET objects.
8. Polly
Polly is a resilience and transient-fault-handling library that helps developers create robust applications by handling exceptions and retries.
9. IdentityServer
IdentityServer simplifies implementing authentication and authorization in your applications, making it a go-to library for building secure systems.
10. MediatR
MediatR implements the mediator pattern, making it easier to manage communication between different parts of your application without tight coupling.
11. SignalR
SignalR facilitates real-time communication between clients and servers, making it ideal for applications that require instant updates.
12. Hangfire
Hangfire is a library for scheduling and executing background tasks in your application. It ensures tasks are processed reliably and efficiently.
13. Microsoft.Extensions.DependencyInjection
This library provides a lightweight dependency injection framework that simplifies managing object lifetimes and dependencies.
14. Swashbuckle (NSwag)
Swashbuckle and NSwag are libraries that generate Swagger/OpenAPI documentation for your APIs, making them easier to understand and consume.
15. Polly
Polly is a resilience and transient-fault-handling library that helps developers create robust applications by handling exceptions and retries.
16. AutoMapper
Automapper allows developers to map between different object types automatically. It's particularly useful when dealing with complex object mappings.
17. Flurl
Flurl simplifies working with URLs and HTTP requests by providing a fluent interface for building and sending HTTP requests.
18. AngleSharp
AngleSharp is a library for parsing and manipulating HTML and XML documents, making it essential for web scraping and parsing tasks.
19. Microsoft.Extensions.Configuration
This library simplifies configuration management by providing a consistent way to access configuration settings from various sources.
Conclusion
As a .NET Core developer, having a solid understanding of these libraries can significantly boost your productivity and enable you to create more robust and feature-rich applications. Whether you're working on web applications, APIs, background processing, or data manipulation, these libraries offer valuable tools to streamline your development process. Stay updated with the latest versions and explore how these libraries can be integrated to maximize the potential of your .NET Core projects.
0 notes
creta5164 · 5 years ago
Text
[Fifth week of 2019.12] White Spirit devlog - Decoration with resources!
Tumblr media
Happy new year everyone!
The reason this article is the 5th week of 2019.12 is because, as always, if the last month overlaps one week, it uses a notation that follows that date.
This week I decided to use tilemaps instead of terrain for artificial structures.
So let's take a look at the process of using tilemaps and other fixes for events and animation bugs.
A new event!
Tumblr media
I just created a new event, an event that allows the player character to stand still.
In the past, I had to stop the player in the 'Event Trigger' component that fires when a specific target is touched.
However, even if use the event variable to indicate that the event is over, even if the event does not need to be triggered by the 'Event Trigger' component, player keeps stopping.
So this can now decide whether or not to stop by the conditions in the event.
--------------------
Getting library from Package Manager
This time, I changed the library that was ported to Json.NET's Unity-only library from the version created by parentElement, LLC from Asset store to a fork of the Json.NET repository.
It uses a package manager (upm) rather than an asset to get and use the library, which reduces the clutter of asset folders. The update is also quite active there.
However, the version used so far complements the self-referencing type loop of some Unity classes or structures (such as Vector types...), and this new library does not have such a function, so additional asset are must added anyway at all. (...)
Tumblr media
But there was a problem. (?)
This is because the DictionaryConverter included in this asset has the ability to convert the Dictionary type, making it impossible to parse the linebreaked string.
In fact, in this case it can't be parsed(...) by default, but Json.NET can parse these by default, so I've changed the extension so that it doesn't make sense.
Tumblr media
Since I have replaced all parts that used the event system v1 with v2, I have deprecated all the code for the event system v1. Now that reduced lots of warnings.
--------------------
Too many, many exceptions of flight animations
Tumblr media Tumblr media
It's not over yet, but I fixing some minor bugs in flight animation.
Once I've cleaned up the flow of the animation state machine, I've organized the animation flow so that when the flight is interrupted in the middle of the animation, it reverts to fit the situation.
You can see that there are only two outgoing states in the state machines.
--------------------
Let's decorate the scene!
Tumblr media Tumblr media
Now I have started decorating Poi's room with decoration! (finally!)
If just make the terrain flat, we'll can see the overall appearance, and I'll make more type of decoration as if needed.
Tumblr media
With the Lost Crypt demo, Unity showed me that tilemaps are also useful, so I decided use tilemap when that is artifical terrain.
In order to use Unity's tilemap, it need to import a modular feature, so install the 2D Tilemap Editor from the Package Manager.
Tumblr media
Let's get out the tile palette editor. ("Window / 2D / Tile Palette" from the top menu)
First, I'll make a palette like this, then make sprites to tiles and put them here.
Tumblr media
...Eh
Tumblr media
So I need something more install package, let’s install it. (...)
Tumblr media
Now in the Sprite Editor, divide it into a grid...
Tumblr media
For slopes, I manually adjusted the collider using the Custom Physics Shape in the editor.
Tumblr media
We can now create tile assets at once by dragging sprites divided into slices onto the tile palette. Unity will asks where you want to store the tile assets. It is recommended that create a folder and store it there.
Anyway the tiles seems don't fit in the square and they're so small...
Tumblr media
The moment I said that, I modified the grid value of Palette Prefab then it suddenly got fitted. (?)
Tumblr media
Once the tiles are created, we can edit the palette by clicking Edit in the palette window and then dragging the tiles in.
Tumblr media
From drawing to tile placement, I decided to lay it out while referring to the my old resources.
Now let's place it on the stage.
Tumblr media
woah, that's a lot bigger than the grid.
Tumblr media
This problem can be solved by adjusting the Pixels Per Unit on the original sprite. I'm aiming to fit a tile by 1 in Unity, so I set a value of 256 pixels per tile in 1 unit. It now fits into the grid, right?
Tumblr media
By the way, the tiles have changed to a slightly turbid color, which seems to be a later look.
Tumblr media
Draw it. I shot it with a time lapse program. I'll talk about it in detail below.
Tumblr media
After placed tiles, I tested it... The player's height is a bit taller than 1 unit(...) So I decided to split the tiles in half.
Tumblr media
Wrap a tilemap collider with a composite collider to calculate it as a collider instead of having a collider for each tile.
Tumblr media
Aaaaaaaaahhhh
Tumblr media
After dividing the tile in half, a minor problem was founded.
Tumblr media
In this case, can be fixed by changing the Collider Type to None in the tile asset.
Tumblr media Tumblr media
So I just finished applying the tilemap. But since the area around the tiles is black, it feels a lot empty.
I think I should solve this next week...
---------------------
I... need... more... resources...
Tumblr media
Perhaps I need to look around for decorations to find out what I need.
If there are elements to decorate the tiles, I'll add them.
It looks like I need to keep creating resources like this.
Oh, this is the program used to shoot the time lapse.
https://github.com/gampixi/autolapse
The description says 'setup and forget' (...). This uses ffmpeg, which can be made as mp4.
Tumblr media
I'll recommended to shoot with normal if you do not need details and very low if you need precise quality. Personally, I shoot 60 frames per second at 60fps.
See you in next week.
5 notes · View notes
somedeveloperblog · 7 years ago
Text
Cosuming JSON Rest API in C#
There is a lof of good libraries to consume JSON API in C#, we can search for rest client in nuger.org. First item on the search result is RestSharp,  a simple REST and Http API client. You can also use System.Net.Http.HttpClient as it is a base for sending http requests and receiving http responses provided by default on .net framework and .net core. In this post, i’ll show both ways how to…
View On WordPress
0 notes
dangersam · 5 years ago
Text
Saved game success with Json
A few months ago I re-implemented the saved game serialization using Json.NET, the idea being to replace the existing BinaryReader / BinaryWriter based approach.  I've already discussed the motivations for this before, so I won't go into it again, if you're interested you can read about it here.
Unfortunately, during testing I found serious performance problems and excessive GC allocations during (de)serialization.  Using JsonSerializer (along with the JsonObject and JsonProperty attributes, JsonConverters, and so on) keeps the code nice and simple, but the performance and memory overhead with large data sets is exorbitant, at least that's what I found.  I was worried the work I'd done would go to waste and I'd have to find some other alternative to the current save / load system.
Well, I have now reworked things again to (de)serialize everything manually with JsonReader / JsonWriter, avoiding JsonSerializer altogether.  Happily this seems to have eliminated the performance and memory issues, it comes at a cost of having more code to maintain and it's not as "clean", but I think this is a small price to pay.
So baring any unforeseen issues, I think using JsonReader and JsonWriter this way will do the job.  The version tolerance Json gives should allow me to move forward with new features without worrying so much about breaking old saves!
1 note · View note
onlineemenu5 · 3 years ago
Text
Top Xamarin Mobile App Development Services in India
Mobile application development is now a vital aspect in all domains. Mobile apps enable associations to interact with their worldwide audience and improve business productivity and effectiveness.
Mobile devices have become a strong tool for businesses to engage and socialize with their clients/customers in an automated manner, and hence cross-platform (Android, iOS, Windows, etc.) and reactive mobile apps are in great demand.
Inwizards, a top xamarin app development company in India, offers solutions for native, hybrid, and cross-platform mobile app development on a variety of mobile platforms. Also, one can hire xamarin developers from Inwizards as we have the best in class team of experts and we can guarantee that you won’t be disappointed!
Why use Xamarin: The.NET Framework. Xamarin, a one-of-a-kind and natively built instrument, makes high-performance mobile apps with native expertise specific to the platform by utilising C# and native libraries wrapped in the. NET layer.
It enables developers to construct platform-specific user interface code coating, which provides a more native user experience than traditional hybrid apps. The platform is made up of the following components:
Xamarin.iOS — The source code is directly compiled into native ARM assembly code.
Xamarin.Android - Xamarin programmes are first compiled to intermediate language, then indigenous assembly is performed at runtime.
Xamarin.Forms - Native generated ports for iOS, Android, and Windows platforms have been runtime mapped to native controls.
The Xamarin platform includes a specialised and automated mechanism for dealing with issues related to memory allocation, garbage collection, and platform interoperability. On all platforms, Xamarin allows developers to leverage and design their own app logic as popular mobile Class Libraries (PCLs) such as SQLite and Json.NET. Developers may use Shared Project to automatically share media and code between iOS, Android, and Windows Phone apps. Among the advantages of Xamarin mobile app development are:
One Technology across all platforms- Xamarin does not require switching between development environments, and programmers can reuse the bulk of the source code, which speeds up the task cycle. At no additional cost, Xamarin IDE includes built-in cross-platform development capabilities.
Greater functionality — Cross-platform mobile apps built with Xamarin are regarded as native, as opposed to hybrid solutions built with web technologies. The Xamarin Test Recorder tool provides a complete solution for assessing and monitoring the app's performance in order to find problems before the launch.
Native user experience - It provides an intriguing development platform because it includes powerful capabilities for app development. It enables new mobile companies to get off to a quick start.  
Final Thoughts As a result, selecting Xamarin as a cross-platform or indigenous development tool is one of the least risky options any Organization can make. Mobile apps for iOS, Windows, and Android are widely used in every industrial area, including production, culinary, logistics, media, automotive, and entertainment.
Check out how a prominent global Telecom network provider uses a Cloud-driven Managed Services Solution to optimize its field-mobility operations in real-time. Enterprises are choosing Xamarin to go mobile and strategically manage their mobile app development in order to quickly enter the app market.
0 notes
suzanneshannon · 4 years ago
Text
Updating FloatingGlucose to .NET 5 - Display Nightscout or Dexcom Glucose Values on the Windows Desktop
Last month I learned how to convert a 13 year old .NET app to modern .NET 5 with the "try convert" tool. It was surprisingly easy to bring a "legacy" app well forward to a pretty darn cool self-contained app. That means NO .NET install. Just run an exe and you're set.
I found this 5 year old .NET application called FloatingGlucose from Bjørn that connects to a Nightscout open source diabetes server like the one I use and displays your current glucose values in a floating popup on your Windows desktop. It can also connect to the Dexcom Share servers. However, the app has an installer and requires .NET 4.6 to be installed.
How quickly - and successfully - can I convert it to a self-contained .NET 5 app? I don't know, I haven't written that part of this blog post yet. I'm still up here.
Let's try it.
Ok, I've forked it here https://github.com/shanselman/FloatingGlucose and I will bring it down to my local machine.
I started using the GitHub CLI lately and it's great, so I'll clone with it.
NOTE: I'm surprised I can't clone AND get submodules with the GH CLI so I guess I need to git submodule update --init --recursive after the initial use of GH.
And looks like GH is out of date so I'll 'winget install gh' to update it while I'm here.
Cool. Now I'll use the dotnet upgrade assistant. This tutorial will show you how. The upgrade assistant is a whole text-based command-line wizard to help you update solutions.
Upgrade Steps Entrypoint: C:\github\FloatingGlucose\FloatingGlucose\FloatingGlucose.csproj Current Project: C:\github\FloatingGlucose\FloatingGlucose\FloatingGlucose.csproj 1. [Skipped] Back up project 2. [Next step] Convert project file to SDK style 3. Clean up NuGet package references 4. Update TFM 5. Update NuGet Packages 6. Add template files 7. Upgrade app config files a. Convert Application Settings b. Disable unsupported configuration sections 8. Update source code a. Apply fix for UA0012: 'UnsafeDeserialize()' does not exist 9. Move to next project Choose a command: 1. Apply next step (Convert project file to SDK style) 2. Skip next step (Convert project file to SDK style) 3. See more step details 4. Configure logging 5. Exit > 1 [22:25:49 INF] Applying upgrade step Convert project file to SDK style [22:25:49 INF] Converting project file format with try-convert, version 0.7.222801 [22:25:52 INF] [try-convert] Conversion complete! [22:25:52 INF] Project file converted successfully! The project may require additional changes to build successfully against the new .NET target. [22:25:55 INF] Upgrade step Convert project file to SDK style applied successfully Please press enter to continue...
So I'm going step by step through the process, answering questions. OK, done. Let's see if it builds.
Looks like it doesn't. It has a custom setup PowerShell script that is trying to call InnoSetup and make an installer. Since I want to make a version that doesn't require an installer, I can remove all that from the PostBuildEvent and PreBuildEvent in the main csproj file.
Now I'm getting a number of compiler errors that aren't related to the conversion, but rather a misunderstanding about how exceptions are to be re-thrown.
When you say "throw err" you're actually losing your call stack and context.
else { //rethrow because we don't know how to handle other errors throw err; }
Instead, just:
else { //rethrow because we don't know how to handle other errors throw; }
throw to maintain the current error context. I'm just tidying up at this point.
I see a few warnings like:
C:\github\FloatingGlucose\FloatingGlucose\FormWebbrowser.cs(10,6): warning SYSLIB0003: 'PermissionSetAttribute' is obsolete: 'Code Access Security is not supported or honored by the runtime.'
and I comment them out as they are vestigial at this point.
I'm down to a final error:
Could not resolve this reference. Could not locate the assembly "System.Windows.Forms.DataVisualization".
Interesting, what's this about? Looks like not all of the Windows Forms DataVisualization project came along for .NET 5? The older code is here https://github.com/dotnet/winforms-datavisualization for .NET Core 3. The readme says "We consider the System.Windows.Forms.DataVisualization deprecated and we only provide it to ease porting to .NET Core 3"
However, Angelo Cresta has a .NET 5 version here https://github.com/AngeloCresta/winforms-datavisualization-net5 so I can try updating to his version. I'll bring it in as a Submodule and then add it as a Project Reference from the main FloatingGlucose app.
I'll also bump the JSON.NET reference from 9 to 13.0.1
NOTE: I'll also put in a dotnet_diagnostic.CA1416.severity = none in an .editorconfig to keep the compiler from warning me that this requires Windows 7 and above.
Boom, this 5 year old app is now a .NET 5 app and builds clean. SHIP IT. Well, test and run it first, eh?
2>Done building project "FloatingGlucose.csproj". ========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
Nice, a clean warning-free build AND it starts up immediately AND looks OK on my 4k monitor likely due to the work that was done to make WinForms apps scale nicely on high dpi systems.
Does it work? Darn right it does.
Fabulous. Now I have a little widget I can have on my screen at all times that shows my current sugars!
And finally, can I make it a single no-install EXE that doesn't even need .NET installed?
dotnet publish --configuration Release --runtime=win10-x64 --output ./publish -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained=true -p:DebugType=None .\FloatingGlucose\FloatingGlucose.csproj
Yes, now I have a single EXE I can run of this now .NET 5 WinForms app:
Fab. That was fun. Took about 2 hours. Consider if YOU can update your "legacy" codebase to .NET 5 and reap the benefits! Here is the 'works on my machine' late night release. PR's welcome. Night!
Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.
© 2021 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media
     Updating FloatingGlucose to .NET 5 - Display Nightscout or Dexcom Glucose Values on the Windows Desktop published first on https://deskbysnafu.tumblr.com/
0 notes
techtutorialsx · 4 years ago
Text
C#: JSONPath
How to apply JSONPath expressions in C#, using the Json.net library.
Introduction In this tutorial we will learn how to apply JSONPath expressions in C#, using the Json.net library. JSONPath is a powerful query language for JSON, similar to XPath regarding XML. In our examples below, we will focus on how to apply simple expressions, as our focus will be on how to use the C# API exposed by the Json.net library. How to apply JSONPath expressions We will start…
Tumblr media
View On WordPress
0 notes
philipholt · 4 years ago
Text
Updating FloatingGlucose to .NET 5 - Display Nightscout or Dexcom Glucose Values on the Windows Desktop
Last month I learned how to convert a 13 year old .NET app to modern .NET 5 with the "try convert" tool. It was surprisingly easy to bring a "legacy" app well forward to a pretty darn cool self-contained app. That means NO .NET install. Just run an exe and you're set.
I found this 5 year old .NET application called FloatingGlucose from Bjørn that connects to a Nightscout open source diabetes server like the one I use and displays your current glucose values in a floating popup on your Windows desktop. It can also connect to the Dexcom Share servers. However, the app has an installer and requires .NET 4.6 to be installed.
How quickly - and successfully - can I convert it to a self-contained .NET 5 app? I don't know, I haven't written that part of this blog post yet. I'm still up here.
Let's try it.
Ok, I've forked it here https://github.com/shanselman/FloatingGlucose and I will bring it down to my local machine.
I started using the GitHub CLI lately and it's great, so I'll clone with it.
NOTE: I'm surprised I can't clone AND get submodules with the GH CLI so I guess I need to git submodule update --init --recursive after the initial use of GH.
And looks like GH is out of date so I'll 'winget install gh' to update it while I'm here.
Cool. Now I'll use the dotnet upgrade assistant. This tutorial will show you how. The upgrade assistant is a whole text-based command-line wizard to help you update solutions.
Upgrade Steps Entrypoint: C:\github\FloatingGlucose\FloatingGlucose\FloatingGlucose.csproj Current Project: C:\github\FloatingGlucose\FloatingGlucose\FloatingGlucose.csproj 1. [Skipped] Back up project 2. [Next step] Convert project file to SDK style 3. Clean up NuGet package references 4. Update TFM 5. Update NuGet Packages 6. Add template files 7. Upgrade app config files a. Convert Application Settings b. Disable unsupported configuration sections 8. Update source code a. Apply fix for UA0012: 'UnsafeDeserialize()' does not exist 9. Move to next project Choose a command: 1. Apply next step (Convert project file to SDK style) 2. Skip next step (Convert project file to SDK style) 3. See more step details 4. Configure logging 5. Exit > 1 [22:25:49 INF] Applying upgrade step Convert project file to SDK style [22:25:49 INF] Converting project file format with try-convert, version 0.7.222801 [22:25:52 INF] [try-convert] Conversion complete! [22:25:52 INF] Project file converted successfully! The project may require additional changes to build successfully against the new .NET target. [22:25:55 INF] Upgrade step Convert project file to SDK style applied successfully Please press enter to continue...
So I'm going step by step through the process, answering questions. OK, done. Let's see if it builds.
Looks like it doesn't. It has a custom setup PowerShell script that is trying to call InnoSetup and make an installer. Since I want to make a version that doesn't require an installer, I can remove all that from the PostBuildEvent and PreBuildEvent in the main csproj file.
Now I'm getting a number of compiler errors that aren't related to the conversion, but rather a misunderstanding about how exceptions are to be re-thrown.
When you say "throw err" you're actually losing your call stack and context.
else { //rethrow because we don't know how to handle other errors throw err; }
Instead, just:
else { //rethrow because we don't know how to handle other errors throw; }
throw to maintain the current error context. I'm just tidying up at this point.
I see a few warnings like:
C:\github\FloatingGlucose\FloatingGlucose\FormWebbrowser.cs(10,6): warning SYSLIB0003: 'PermissionSetAttribute' is obsolete: 'Code Access Security is not supported or honored by the runtime.'
and I comment them out as they are vestigial at this point.
I'm down to a final error:
Could not resolve this reference. Could not locate the assembly "System.Windows.Forms.DataVisualization".
Interesting, what's this about? Looks like not all of the Windows Forms DataVisualization project came along for .NET 5? The older code is here https://github.com/dotnet/winforms-datavisualization for .NET Core 3. The readme says "We consider the System.Windows.Forms.DataVisualization deprecated and we only provide it to ease porting to .NET Core 3"
However, Angelo Cresta has a .NET 5 version here https://github.com/AngeloCresta/winforms-datavisualization-net5 so I can try updating to his version. I'll bring it in as a Submodule and then add it as a Project Reference from the main FloatingGlucose app.
I'll also bump the JSON.NET reference from 9 to 13.0.1
NOTE: I'll also put in a dotnet_diagnostic.CA1416.severity = none in an .editorconfig to keep the compiler from warning me that this requires Windows 7 and above.
Boom, this 5 year old app is now a .NET 5 app and builds clean. SHIP IT. Well, test and run it first, eh?
2>Done building project "FloatingGlucose.csproj". ========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
Nice, a clean warning-free build AND it starts up immediately AND looks OK on my 4k monitor likely due to the work that was done to make WinForms apps scale nicely on high dpi systems.
Does it work? Darn right it does.
Fabulous. Now I have a little widget I can have on my screen at all times that shows my current sugars!
And finally, can I make it a single no-install EXE that doesn't even need .NET installed?
dotnet publish --configuration Release --runtime=win10-x64 --output ./publish -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained=true -p:DebugType=None .\FloatingGlucose\FloatingGlucose.csproj
Yes, now I have a single EXE I can run of this now .NET 5 WinForms app:
Fab. That was fun. Took about 2 hours. Consider if YOU can update your "legacy" codebase to .NET 5 and reap the benefits! Here is the 'works on my machine' late night release. PR's welcome. Night!
Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.
© 2021 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media
     Updating FloatingGlucose to .NET 5 - Display Nightscout or Dexcom Glucose Values on the Windows Desktop published first on http://7elementswd.tumblr.com/
0 notes
creta5164 · 6 years ago
Text
[Second week of 2019.11] White Spirit devlog - Misunderstanding of Manipulator and the struggle with bugs
Tumblr media
Hi, there.
This week, the code I started fixing after discovering an issue that did not clean up event callbacks in the editor created a fairly complex bug. I spent quite a lot of time looking for bugs in three days, so I have fewer devlog this week.
Tumblr media
As soon as I created the dialog last week, I implemented the selection dialog. However, while implementing this, I found that the usage of the Manipulator is wrong.
The first discovery that the Action event that implemented and registered the dialog event last week was not cleaned up when the event editor was unloaded.
I was thinking that the UnregisterCallbacksFromTarget method would be called when the element was removed from the layout.
Tumblr media
Fortunately, this problem was solved simply by removing the Manipulator from DetachFromPanelEvent.
(If you recycle layout object, this is not recommended. Remove the Manipulator when your layout object are cleaned up.)
Tumblr media
So, I revamped our abstract Manipulator class for the event editor.
Changed DetachFromPanelEvent to handle internally automatically.
However, while fixing this, I found some difficult bugs.
As the Unity came to 2019, there was even a bug where Unity crashed every time when view a native object in debugger, so I spent quite a bit of time debugging in the editor.
Fortunately it was a simple problem and I fixed a bug that was difficult.
Tumblr media
And while checking this, I found out that Json.NET is basically able to parse even if it contains line breaks.
Tumblr media
The default parser included in JavaScript, the original owner of JSON, doesn't accept this syntax (...)
Anyway, the fact that line breaks are parseable can be useful when I need a long text.
Tumblr media
Anyway, after going through various problems, I added a camera change event, a camera zoom event, and added a feature to assign a unique color to each event.
Tumblr media
This work is now beginning to end. I want to make some real parts of game...
Tumblr media
See you in next week.
1 note · View note
Text
Brief for project - Context outline
We began with an in person Hackspace hackathon with the intention of facilitating quick idea generation and project ideation. The first of two hackathons setup during the Hackspace module, this one with the intention of collaborative ideation. The brief was open and would allow us to explore multiple ideas in groups and ideate on these collaborative thoughts. This blog is an in-depth documentation of the process and the realisation of the project and all its components. 
The brief being so open meant that within our groups we would need to quickly run through a number of project ideas, looking at feasibility and our skillset. We ended up deciding that the context of the project was surrounding the generation of character connections for use in games and maybe with a future development for general storytelling. The project would aid in the creation of character wireframe, a web of connection with a number of assets, this ultimately being helpful adding depth to a game of Dungeons and Dragons for example.
Hackathon - Techniques
Though I have already mentioned the idea and the context it's embedded in, the idea only came to fruition through the hackathon. Only through the use of these techniques mentioned were we able to nail down the project and how it would address certain issues.
We started the Hackathon with a page dump, trying to note down as many areas or concepts as possible then we began to refine the assortment of concepts and help narrow down areas for focus. This technique was helpful in applying some restraints to the creative process, creating a small amount of pressure for the development of ideas. Through this method we were able to as a group nail down specific areas for theme development. These were Connections, Dreams, Parallel. We looked at a combination of all three when attempting to ideate through possible applications. 
Failed Ideas / progress
We found an initial idea that centred around an alarm application that would be able to track your sleep and then deliver a personalised wake-up routine to ease the transition from sleeping to awake.
Using these themes we were able to come up with this idea quickly, we spoke and attempted to develop it further having to complete a small presentation for the class in order to receive feedback and critique. We continued to look at possible technologies in order to achieve the application. We quickly found that the technical ability in the timeframe we had would not be feasible in combination with the feedback we had received from the group.
The Idea
After moving away from our initial idea we continued to think on an application with user benefits that would fit the technological and time constraints of this collaborative project. Joel pitched an idea for a character generator with the application to aid users in the quick creation of character connections for use in games such as Dungeons and Dragons where characters are heavily focused. We also spoke about future applications being for writers, generally aiding in creating webs of characters with relationship indicators.
In terms of reaching the foundations of this idea we looked at a number of methods outlined in the teaching during the Hackathon. Reverse brainstorming helps facilitate this idea heavily. Being able to identify a problem that many of us have faced, look at a possible solution and develop a real solution to said area. We found that attempting to come up with a large collection of characters quickly with a few attributes was difficult, only being able to figure out the central character. We found that using a bank of many attributes, names and relationship levels we could quickly create a character web for story based situations.
We were also able to apply a number of techniques from the Scamper Method, Adapting a similar concept of generators. Example: Name generators, idea generators. There seemed to be an endless amount of generator websites for all different areas. Using the Adapt concept we had changed the context of existing models, applying it to a more niche market and adjusting the tone for a more creative story orientated product. It could also be loosely applied to the Rearrange concept, having reordered the users journey giving them a platform to build from rather than shaping their characters whilst involved in a specific game or story situation. It hadn’t completely removed this aspect as the generator served as a baseline for users to work from and adapt, adopting as little of the generated information as they desired.
What followed and the development of the idea
Paper prototyping
Tumblr media Tumblr media
Initial meeting
We spoke about what kind of technologies we wanted to use when creating the product
We decided initially on an entirely web based stack, using html for the frontend with an RESTful API for the sending and receiving of data. It would also allow use to connect the entire application to a database for persistent storage
Began to paper prototype some interface designs, Nishesh was set the role of UI designer and began working on some high fidelity mockups to add in the frontend development that would be undertaken by Joel.
First Tasks
I had researched a number of technologies from our initial conversations regarding what stack to use, we had come to the conclusion that each of us brought certain skills and we should utilise them. In keeping with this, I had come to the conclusion that Node js, Express, Mongoose and Mongodb would be our key backend technologies.
I began researching possible implementations for Mongodb (The database) and the Node js server using express as a framework. I had only used Mongodb once before and after researching I found Mongoose a package that allowed me to customise schemas for sending and receiving data from the database
I then began creating the API, creating specific routes for specific data, this would create documents in the database that could be queried and updated.
Technical Design
Backend
GitHub Repo: https://github.com/blanghamm/hackspace-collab-api
MongoDB
Tumblr media
Document stucture for MongoDB, collections on the left hand side.
The backend structure was very important in dictating the frontend usage and also how we stored all the user information as well as the template names and attributes. We needed something that was flexible, this was the main factor in choosing MongoDB as the database. MongoDB is a NoSQL database, it relies on collections that contain documents rather than tables (SQL). Its lack of structure in comparison to SQL is what makes it very helpful for robust flexible data management.
Mongoose
Tumblr media
Schema for the structure of data inside of the database when moving through the server.
Mongoose was used as middleware when creating the server that connected to the database, it facilitated the creation of schemas. Schemas allow for a number of rules to be set up restricting the information parameters be it for incoming or outgoing data. For example the schema model for sending data is structured as below (Image) it shows the type of data it expects. This allows for the data we send and receive to be consistent throughout the API. This would help with interpreting the information later in the frontend application.
Express
Tumblr media
Main server file that contains all the routes for the API.
Express is a framework for Node js , it helps in easing the process when creating a server. Having a myriad of HTTP utility methods and middleware built in. It states on their website that ‘creating a robust API is quick and easy’. https://expressjs.com/ Having used it previous I found this statement to be pretty accurate. I was able to quickly create a server with a single entry point and then begin to attach various routes.
Hosting
Tumblr media
List of builds on Heroku allowing for access to the API with a URL.
It’s not very exciting but here’s the link for the API with the endpoint firsnames, which will return a JSON dataset with firstnames stored in the database. They are structured by the Mongoose schema pattern linked above. 
https://hackspace-api.herokuapp.com/firstnames
Once I had created the different endpoints depending on the data needed for the frontend I made it more accessible by hosting it on Heroku. A hosting platform specially designed for web applications. This meant it was accessible from anywhere with the correct URL. This meant when Joel began testing the frontend application he was able to access the data without having to download all of the necessary files.
Frontend
GitHub Repo: https://github.com/JoelRobinsonUK/ConnectionGenerator
Prototype
youtube
Here’s a link to the working protoype: https://joel-robinson.itch.io/character-relationship-generator
We initially decided on an entirely web based application, many of the team wanted to try out some new technologies. Once we had begun researching all of the necessary technologies we found that creating the frontend in purely HTML and JS would be quite difficult without a framework for live data manipulation. We therefore decided to use Unity for the frontend application as this was more familiar to the team. 
The combination of a Unity frontend and Node js backend proved to be a strong combination but there were a number of issues along the way. One main issue we had when attempting to retrieve the data from the API was how Unity interrupted JSON data which is what the server stored all its information in. Initially using the Unity plugin JSON Utility to decode the data we found that it was not able to process objects wrapped inside of a top level array. We therefore found another plugin that allowed use to decode the JSON data inside of Unity. JSON.net was that plugin that helped us with data transfer.
Tumblr media
The code needed for a web request, pointing at the heroku hosted URL.
We used a web request to retrieve all of the data from the API and also send data back when needed, it allowed us to manage the data separately and only request it when needed. This helped with removing a large dataset inside of Unity and meant updating information would be much easier due to its external nature.
Maximum degrees of separation
Degrees of separation decide the amount of single point connections that stem from the main character. Adding more degrees will create offshoots further away from the central character.
Not all smooth sailing
When speaking to Joel about any technical setbacks, he found that attempting to sort the degrees of separate had some odd outputs from the node rings that are pre-placed. When the user begins interacting it limits the amount of nodes that are shown depending on the degrees of separation, but this would cause some interesting connection lines between the nodes that wouldn’t strictly follow the users rules.
Visual Design
youtube
When planning the visual side of the application we found a quick way to move forward with the prototyping phase was to paper prototype a user interface. (Image) We wanted to have a central area with the connections clearly highlighted followed by a number of settings and modifiers surrounding it to allow for a constant reconfiguration. It would give the user the ability to regenerate a set of character relationships on the main dashboard without having to start the process from scratch.
Tumblr media Tumblr media
These two examples above are from the original high fidelity designs Nishesh created from the paper prototypes. The video above is the second iteration and closer to the desired design.
When moving forward with the UI designs, Nishesh began developing the initial version of high fidelity designs. He initially used Sketch to create the designs sharing them through Zeplin, which also included the css properties though they were no longer needed due to the change in frontend framework. The second refined designs were created using Adobe XD as they had some collaborative features that would be useful for future developments. I’ve included some screenshots of the UI itself (List Order) Also attached is a video with a run through of how to use the interface.
Here’s a link to all of the visuals used throughout the projects development:
https://drive.google.com/drive/folders/1fa5MCDmFke7bUY2hwkxnC577YSi0c410?usp=sharing
User Testing
“Overall I really like the product. It’s a good way to develop a story as what often delays the plotting process is coming up with the characters and deciding what their relationships to each other are. This tool offers prompts to help with that process.
Suggestions: An option of seeing “biggest fear” or “dreams” to have a better understanding of the characters.  
The option to change the type of relationship between two characters, and add/remove connections.”
We found through some quick user testing that the application fit the area we had intended to deploy it to, helping with the process of character relationships. With the feedback we received we were able to add a number of possibilities to the future development document, adding more customisation for users would be the next logical step. Made possible by the flexibility of our system architecture.
Critical Reflection
Development
The overall concept for the project fit nicely with the prototypes we created and used a number of key technologies that utilised skill sets within the team. It focused on a problem and adapted current applications such as name generators to create a unique character relationship generator for story based games. Also being able to test it on a number of participants helps us to diagnose areas that require more focus. 
The requirements for the project were met, we were able to create a number of visual prototypes that could showcase the UI and design aspects of the project. Moving from the paper prototypes and adapting them to fit the needs of the application. Using technology such as Node js allowed for the creation of a flexible and scalable platform that would facilitate future development of the project. This coupled with a Unity frontend that could be attached to the backend system helped with quick prototyping of a reactive product.
Being that we had used these two separate technologies also meant that for future development the project itself had become rather modular and therefore if we found weakness in certain technologies we could reconfigure the stack depending on the specific boundaries.
Roles & Collaboration
Being that the initial concept took a few sessions to iron out, it allowed us to fully understand each other's strengths and assign each role to the correct team member. I think this is apparent in the progress the project made and the wide range of technologies that contribute to the final prototype. Throughout the project we kept to our initial concept and made sure not to scope creep too heavily, any additional ideas were added to a future development document which Wiktor had been updating and assessing how that would benefit our project in the future. This had been vital in keeping on track with the concept and delivering a prototype as close to our original idea as possible. 
Possible areas for improvement were only due to the lack of knowledge in specific areas, it was marginally disappointing that when jumping between technologies we all lacked a slight understanding of each other's role and tech. There were of course areas that we could help one another but it would have been better as a team to be able to jump between all roles and offer as much assistance as possible. As much as this was a disappointment in terms of having more input to specific aspects, I feel the team was very effective in their area delivering some high quality prototypes, that in tandem with consistent communication throughout.
Personal contribution
There were moments during the project that certain aspects felt a little aimless in our goals but I feel that as a team we were able to address this issue with each of us pushing the others on certain aspects and putting us back on track. Throughout the project I felt as though I personally had to do this, scheduling meetings to share progress and make sure everyone was comfortable with their personal objectives. 
I enjoyed working on my specific technology and believe that it contributed heavily to the project and made sure it was scalable and easy to use for other team members. Throughout the project I felt that the leadership was mainly managed by Joel and he helped align the scope throughout but there were times when I would need to check in and monitor that everyone was happy and on course which worked well not putting too much pressure on one team member.
Future Developments
When looking at future developments for the project a number of ideas that we had taken during the development process had been added, as not to scope creep. Being able to save the character web for future reference and allow for the editing and saving of an updated character web. This would be easy to implement with the flexibility of the backend API, the overall structure of the database would allow users to save full webs and recall when needed. 
References
parentElement LLC (2017) JSON .NET For Unity (2.0.1). Available at: https://assetstore.unity.com/packages/tools/input-management/json-net-for-unity-11347 (Accessed: 20 October 2020).
Heroku., 2020a. Platform as a Service | Heroku [online]. Available from: https://www.heroku.com/platform [Accessed 6 Nov 2020].    
Mongoose., 2020b. Mongoose ODM v5.10.12 [online]. Available from: https://mongoosejs.com/ [Accessed 6 Nov 2020].    
MongoDB., 2020c. The most popular database for modern apps [online]. MongoDB. Available from: https://www.mongodb.com [Accessed 6 Nov 2020].
Express., 2020. Express - Node.js web application framework [online]. Available from: https://expressjs.com/ [Accessed 6 Nov 2020].  
0 notes
dangersam · 5 years ago
Text
Photon PUN and building UI feedback
Happy new year everyone!  Time for a quick dev update for last week (meant to post this earlier, but ah well).
Networking abstraction and Photon PUN
About a year ago I implemented a networking abstraction layer to separate use of the deprecated Unity RakNet based API from the rest of the code.
Last week I made some improvements to its interface to finish it off, and then I added a new implementation under the hood using Photon PUN 2.  I went with PUN because it's easy to get up and running, it's well supported, and its API is very similar to the old Unity API.  Thankfully the PUN implementation was relatively easy to do, partly due to the API similarity, and partly because of the abstraction layer which meant I didn't have to touch the rest of the code.
I've no idea yet if I'll stick with PUN in the long run, but for now it at least means I can get rid of all references to the deprecated Unity networking API, while not breaking my prototype multiplayer implementation.  So now I'm finally free to move on past Unity 2017.4 and upgrade to a newer version, which I'll hopefully be doing soon!
Builder tool UI feedback
After the recent video I put out about the builder tool UI changes I was considering, I've had loads of amazing and really useful feedback, so thank you for that!  I think the consensus is to leave things as they are and focus on the rest of the game, so that's what I'll be doing, at least for now.  I'll keep the prototype code around somewhere in case I need to come back to it in the future.
Saved game serialization
As for this week, I'm back to looking at Json.NET saved game serialization, a topic I covered a few months ago.  I'm trying to improve on the performance and GC alloc issues I had discussed in that blog post.  If this doesn't work out then Json isn't going to be viable for this purpose, and I'll have to think of another way to solve the inflexibility of the current binary stream based system.
1 note · View note
freebiesms · 6 years ago
Text
Error getting value from 'ScopeId' on 'System.Net.IPAddress'.
Error getting value from ‘ScopeId’ on ‘System.Net.IPAddress’.
Tumblr media
When you try to serialize an object that contains an IPAddress, you get the error message Error getting value from ‘ScopeId’ on ‘System.Net.IPAddress’.
So, you have to override how Json.NET (Newtonsoft) serializes this type. Which means you create a class that converts a this problematic type to and from a string youself.
public class IPConverter : JsonConverter<IPAddress> { public override void…
View On WordPress
0 notes
just4programmers · 6 years ago
Text
Learning about .NET Core futures by poking around at David Fowler's GitHub
David Fowler is the ASP.NET Core Architect (and an amazing highly technical public speaker) and I've learned a lot from watching him code. However, what's the best way for YOU to learn from folks like David if you can't sit on their shoulder? Why, look at their GitHub!
Since .NET Core (and most of Microsoft) is not only open source but also developed in the open now on GitHub, we can actually watch folks in their day to day work as they commit code to projects like the C# compiler, .NET Core, and ASP.NET Core.
Even more interestingly, we can look at David's github here https://github.com/davidfowl and then under Repositories see what he's up to, filter by language and type, and explore!
You can have Private repositories on GitHub, as I do, and as I'm sure David does. But GitHub is a social network for code and it's more fun and a better learning experience when we can see each others code and read it. Read with a critical eye, but without judgment as you may not have all the context that the author does. If you went to my GitHub, https://github.com/shanselman you might be disappointed but you also may be missing the big picture. Just consider that as you Follow people and explore their code.
David is an advanced .NET developer, while, for example, I am comparatively intermediate. So I realize that not all of David's code is FOR me. It's a scratchpad, it's not educational how-to workshops. However, I can get pick up cool idioms, interesting directions the tech may be going, and more importantly - prototypes and spikes. Spikes are folks testing out technical ideas. They may not be complete. In fact, they may never be complete. But some my be harbingers of things to come.
Here's a few things I learned today.
gRPC for .NET Core
For example, at https://github.com/davidfowl/grpc-dotnet I can see David has forked (copied) gRPC for dotnet and his game is working with the gRPC folks to make a fully supported version of gRPC for production workloads with .NET Core! Here are the stated goals:
We plan to implement a fully-managed version of gRPC for .NET that will be built on top of ASP.NET Core HTTP/2 server.
Good integration with the rest of ASP.NET Core ecosystem
High-performance (we plan to utilize some of the cutting edge performance features from ASP.NET Core and in .NET plaform itself)
That sounds cool! I can go learn that gRPC is a modern (google sponsored) Remote Procedure Call framework that can run anywhere. It's used by Netflix and Square and supports basically any languaige and any environment. Nice for this microservice world we are entering and hopefully has learned from the sins of DCOM and CORBA and RMI, because I was there and it sucked.
Nothing to see here but moving to a new JSON serializer
This Web.Framework sounds fun, and I'll be sure to take the description to heart.
You can see David and James Newton-King kicking ideas around as you explore the commit log. However, the most interesting commit IMHO is when David moves this little spike from using JSON.NET (the ubiquitous 3rd party JSON serializer) to the new emerging official System.Text.Json. Here is the commit with unified differences.
It's a small change but it also makes me feel good about the API underneath this new JSON API that's coming. My takeway is that it's not as scary as I'd assumed. Looks like a Good Thing(tm).
  Cool!
Multi-Protocol ASP.NET Core
This looks interesting.
"The following sample shows how you can host a TCP server and HTTP server in the same ASP.NET Core application. Under the covers, it's the same server (Kestrel) running different protocols on different ports. The ConnectionHandler is a new primitive introduced in ASP.NET Core 2.1 to support non-HTTP protocols."
I didn't know you could do that! Looks like this sample hasn't changed much since it was conceived of in 2018, but then in the last month it's been updated twice and it appears to be part of a larger, slow-moving architectural issue called Bedrock that's moving forward.
I learned that Kestral (the ASP.NET Core web server) has a "ListenLocalhost" option on its options object!
WebHost.CreateDefaultBuilder(args) .ConfigureServices(services => { // This shows how a custom framework could plug in an experience without using Kestrel APIs directly services.AddFramework(new IPEndPoint(IPAddress.Loopback, 8009)); }) .UseKestrel(options => { // TCP 8007 options.ListenLocalhost(8007, builder => { builder.UseConnectionHandler<MyEchoConnectionHandler>(); }); // HTTP 5000 options.ListenLocalhost(5000); // HTTPS 5001 options.ListenLocalhost(5001, builder => { builder.UseHttps(); }); }) .UseStartup<Startup>();
I can see here that TCP port 8007 is customer and uses a custom ConnectionHandler which I also didn't know existed! I can then look at the implementation of that handler and it's cool how clean the API is. You can get the result cleanly off the Transport buffer. You're doing low-level TCP but it doesn't feel low level.
using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; using Microsoft.Extensions.Logging; namespace KestrelTcpDemo { public class MyEchoConnectionHandler : ConnectionHandler { private readonly ILogger<MyEchoConnectionHandler> _logger; public MyEchoConnectionHandler(ILogger<MyEchoConnectionHandler> logger) { _logger = logger; } public override async Task OnConnectedAsync(ConnectionContext connection) { _logger.LogInformation(connection.ConnectionId + " connected"); while (true) { var result = await connection.Transport.Input.ReadAsync(); var buffer = result.Buffer; foreach (var segment in buffer) { await connection.Transport.Output.WriteAsync(segment); } if (result.IsCompleted) { break; } connection.Transport.Input.AdvanceTo(buffer.End); } _logger.LogInformation(connection.ConnectionId + " disconnected"); } } }
Pretty slick. This just echos what is sent to that port but not only has it educated me about a thing I didn't know about, it's something I can mentally file away until I need it!
All of these things I learned in just 30 minutes of exploring someone's public repository.
What kinds of code do you like to read and what have you learned from just poking around?
Sponsor: Get the latest JetBrains Rider for remote debugging via SSH, SQL injections, a new Search Everywhere popup, and improved Unity support.
© 2018 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
technicallycoolalpaca · 7 years ago
Text
As an Amateur, I struggle with being confident in my own code. I dream of building a game My friends can play but second guess myself.
For some context, I put about 7-8 months of work into a game, and made a lot of progress. I even rewrote the game from scratch 3 times, with each new version feeling better. It's a rogue like, in c#, using sadconsole.
Eventually I stopped due to burnout, but I'm gearing up to jump back into the project. However a nagging feeling of inadequacy is making me hesitant. I'm self taught, so I constantly feel like I'm doing things wrong, and I certainly am, but it's so difficult to have a sense of when I have improved, even marginally.
For example, the thing that drove me crazy was just building the logic behind all the file handling and installation procedures.
I decided to create a folder in my systems local application data using the path returned by Environment.GetFolderPath(Environment. SpecialFolder.ApplicationData).
Once I had that, I just created directories inside that folder which would basically just hold the user data and preferences using Json files. My project used Json.net so I basically store all player data and progress as Json files. I limited the available memory slots to four directories. I didn't want players to be able to create an infinite amount of new users for their install, so each of the four in game save slots just points to one of those folders and stores the Json there.
'Installation', feels laughable. The code literally just creates maybe 10 directories and copies an embedded master Json file for initial preferences and new game templates.
Everything worked fine but that's what is so unsatisfying. There's no way to tell if this is how I should handle the installation of my game because it feels so brittle and simple minded. Anyone could easily break the installation or corrupt it.
But as I researched more about this I found there are many different ways to approach the problem. Which made me feel directionless because I had no idea what the best practice would be - everyone had a different approach.
Has anyone else struggled with this feeling ? It's almost as if every decision seems completely arbitrary, because it's a simple game and there's no way to grind my teeth or see an obvious advantage in any direction. I could structure my application data 20 different ways, how do I find a way that feels professional?
submitted by /u/whatcomputerscantdo [link] [comments] from Software Development - methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/2DDkdIr via IFTTT
0 notes
myopicmage · 8 years ago
Text
Want to configure your Json formatter?
In ConfigureServices() inside of Startup.cs:
services.AddMvc().AddJsonOptions(options => { options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; });
asp.net core uses json.net under the hood. No more annoying /Date(387298507349)/ when you return a DateTime.
1 note · View note