JSon format as arguments in function

SyntaxEditor Web Languages Add-on for WPF Forum

Posted 10 years ago by Daniil Monin - Software Architect, Sovacode Software
Version: 13.2.0591
Avatar

Hello!

When I using SyntaxEditor and Web Lang Addon in case when I try to format function with arguments JSon or BSon structure like this:

db.bios.update( { _id: 1 }, { $set: { "name.middle": "Warner" } } )

I'll get

db.bios.update( {
	_id: 1
}, {
	$set: {
		"name.middle": "Warner"
	}
} )

But, it will be nice if format will be return something like this:

db.bios.update( 
	{ _id: 1 }, 
	{ $set: { "name.middle": "Warner" }} )

Could you improve formatting code? I know, I can write my own code formatter, but it will be nice to get out-of-box this feature. :)

Thank you!

Comments (4)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Daniil,

It looks like Visual Studio formats it more like we do when it expands out object literals.


Actipro Software Support

Posted 10 years ago by Daniil Monin - Software Architect, Sovacode Software
Avatar

Sorry, I don't get it %)

You mean format works like in Visual Studio?

My application should work with JS scripts for MongoDb. And all MongoDb scripts contains JSon. So thats why I asking about JSon format :)

And I do not using Visual Studio to write them, currently I took all scripts from MongoDb Help.

Thanks!

[Modified 10 years ago]

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Daniil,

Right, I mean that in general we try to mimic how Visual Studio does things.  And Visual Studio expands out JSON during text formatting, it seems to do it similar to what we currently have.


Actipro Software Support

Posted 10 years ago by Daniil Monin - Software Architect, Sovacode Software
Avatar

Oh, ok.

Now I understand. :)

Thanks!

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.