json


Preserve datatype name when converting to JSON with ConvertTo-Json


I'm trying to export my SSIS catalog environment to a JSON file (with PowerShell). When I select the right columns I see "String" and "Int16" as value for the Type:
but when I convert to JSON with ConvertTo-Json it shows the int values instead of the string values:
Any suggestions?

Looks like the Type values are of type [System.Data.DbType]. ConvertTo-Json converts the value names to the underlying numerical value of the DbType enum.
You can override this behavior with the Select-Object statement:
$Environment.Variables |Select-Object Name,Description,#{Name='Type';Expression={"$($_.Type)"}},Sensitivity,Value |ConvertTo-Json


Related Links

Embedded JSON struct
how to do autocomplete in angularjs using JSON
How to use custom JSON attributes in Chef recipe
export and import data from mongodb using node.js express
I am working on geojson file with 10000 features now in order to plot heatmaps I need to modify all 10000 features any efficient way to do this?
Typescript internal module not recognized by VS Code
How to loop through JSON in ruby
How to get a json key from a Sequence File in pig
How to use play-json format/reads/writes macro with tagged types
Bootstrap Table – Loading Data from JSON Object Property
google map JSON.parse: bad escaped character at line 1 column 42 of the JSON data
JSON regex pattern
Restrict the size of POST request (application/json) in tomcat 7
Golang JSON Encoder and nginx proxy buffering
Send Json files consists of many rows from web server applications to mobile applications and vice versa
Sort aggregations on element of multi-bucket sub-aggregation

Categories

HOME
pug
oauth
visualization
docker-swarm
mainframe
jpanel
spring-cloud-contract
height
lagom
data-analysis
simple-injector
off-canvas-menu
ms-access-2007
internet-explorer-8
vs2017
linq-to-sql
android-fragmentactivity
sonarqube-msbuild-runner
excel-2010
url.action
hhvm
http-method
activepython
printdocument
data-cleansing
mef2
fileinfo
pep8-assembly
hibernate-cache
android-vpn-service
percentage
pljson
npm-shrinkwrap
npm-publish
mediawiki-extensions
spring-bean
aqgridview
production-environment
gauss
broadcast
jenkins-jira-trigger
mouseclick-event
spell-checking
chrome-remote-desktop
nuget-server
gce
sqldatareader
sql-server-administration
coremidi
xib
freetype2
asteriskami
com-interop
soda
multilingual-app-toolkit
self-hosting
data-import
vips
registrykey
base32
vine
rspec3
shift-jis
robocode
kendo-mvvm
emma
alpha-transparency
bullet
neoload
colt
phpdocx
map-force
zipalign
bounds
initialization-vector
driver-signing
sttwitter
haskell-platform
magickwand
android-4.0
xgettext
unions
path-manipulation
ajax.beginform
querystringparameter
search-path
code-design
usability-testing
method-signature





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm